I have a slds-grid that I want to display conditionaaly I tried <div class="slds-grid slds-wrap slds-gutters" rendered="{on condition true}">

doesn't work, condition is correct. Tried using 'aura:if' but seems like I need to import some lib for it to work, only adding at start of the page is not enough.


Use apex:outputText:

<apex:outputText rendered="{!someCondition}">
  <div class="slds-grid slds-wrap slds-gutters">

Or, you can add in slds-hide:

<div class="slds-grid slds-wrap slds-gutters {!if(someCondition,'','slds-hide')}">
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.