LWC Conditional Rendering – How to Render Properties on Community/Digital Experience Pages

digital-experiencelightning-web-components

I have created a Lightning Web Component for Community/Digital Experience page. I have also exposed some properties to app builder to configure the component. But I want to show/hide a property based on other properties selected value.

<property name="layout" label="Layout" type="String" datasource="Promotional, Event Details" default="Event Details" description='Changes the layout of the event.'/>

Now based on layout I want to show/hide below properties:

<property name="showEventDetailsButton" label="Show Event Details" type="Boolean" default="false"
                  description="When checked the Event Details button will be available on the Promotional Event UI."/>
<property name="eventDetailsLabel" label="Call To Event Detail Action Label" type="String"
                  description="Text to use as the Call to Action." default="Event Details"/>

Is there any way to achieve this?

Best Answer

Unfortunately this isn't currently possible as you would need a Custom Property Editor to achieve this.

This functionality is has been raised as an product suggestion with Salesforce and was included in the January 2023 prioritization cycle. You can vote on and track the status of the Idea here: Allow App Builder to Use Custom Property Editors