function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KRayKRay 

conditionally rendering design attributes?

Hi All, 
Is it possible to dynamically render design attributes based on the value of another attribute?  The purpose of this is to show different values within Lightning App builder based on the Admin's selection. 

For instance, let's say I have 2 Boolean attributes within the design bundle.  By default, attribute #2 isn't visible.  When attribute #1 is true, attribute #2 becomes visible, and vice versa. Is this possible within the DESIGN BUNDLE?
 
Ajay K DubediAjay K Dubedi
Hi KRay,
Use bellow code for conditionally rendering it may helpful for you.
 
<aura:component>
    <aura:renderIf isTrue="{!v.truthy}">
        <div style="padding:15px; background-color:LightBlue">
            this div show because attribute is true
      </div>
    <aura:set attribute="else">
        <div style="padding:15px; background-color:GreenYellow">
            this aura:set div show because attribute is false
         </div>
    </aura:set>
  </aura:renderIf> 
</aura:component>

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com