lightningCommunity__Default Target

Enables a component in Experience Builder to expose editable properties when the component is selected. Only properties defined for thelightningCommunity__Page or lightningCommunity__Theme_Layout targets are editable in Experience Builder.

Configures the component for different page types and defines component properties. For Experience Builder sites, only lightningCommunity__Default supports component properties. The targetConfigs tag contains at least one targetConfig tag.

Configures a page type with this attribute.

AttributeDescriptionRequired
targetsSpecify one or more page types in the targets attribute, such as <targetConfig targets="lightningCommunity__Default"> or <targetConfig targets="lightningCommunity__Default,lightning__AppPage">. The targets attribute value must match one or more of the page types that you listed under <targets>.Yes

The targetConfig tag includes at least one property tag.

Specifies a public property of a component that can be set in Experience Builder. The component author defines the property in the component’s JavaScript class using the @api decorator. See the Usage section.

Use the property tag with these attributes.

AttributeTypeDescriptionRequired
nameStringThe attribute name. This value must match the property name in the component’s JavaScript class.Yes
typeStringThe attribute's data type. The following values are valid for all targets. Make sure that this value matches the type assigned to the property in the component's JavaScript module. If the types don't match, the value in the configuration file takes precedence.
  • Boolean
  • Integer
  • String
  • Color—Displays a color selector. Use the default attribute to specify RGBA, RGB, or hex strings. For example: <property type="Color" name="backgroundColor" default="rgba(0, 255, 255, 1)" />.
  • ContentReference—Displays a window in Experience Builder for selecting Salesforce CMS content. You can use the filter attribute to restrict the window contents to specific content types. For example: <property type="ContentReference" name="contentId" label="Content ID" filter="cms_image, cms_video" />.
Yes
datasourceStringRenders a field as a picklist, with static values. Supported only if the type attribute is String. For example: datasource="value1,value2,value3". You can also set the picklist values dynamically using an Apex class, such as: datasource="apex://MyCustomPickList". For more information, see Create Dynamic Picklists for Your Custom Components.
defaultStringThe default value for the attribute.
descriptionStringDisplays as an i-bubble for the attribute in Experience Builder.
exposedToStringRequired if you use the screenResponsive attribute. The valid value is css.
filterStringSupported only when the type is ContentReference. Specifies the Salesforce CMS content type to display in the component in Experience Builder. Valid values are:
  • cms_document
  • cms_image
  • cms_video
  • news
  • custom_type, where custom_type is the name of a custom content type
labelStringDisplays as a label for the attribute in Experience Builder.
maxIntegerThe maximum allowed value for an attribute of type Integer.
minIntegerThe minimum allowed value for an attribute of type Integer.
placeholderStringInput placeholder text for the attribute when it displays in Experience Builder. This text is the ghost text in text fields and text areas before a user starts typing. Supported only if the type attribute is String.
requiredBooleanSpecifies whether the attribute is required. The default value is false.
screenResponsiveBooleanSpecifies if a component integer or string property is screen-size responsive. The default value is false. To allow the component to use the correct property value based on the user's screen-size, set screenResponsive to true and set the exposedTo attribute to css.

To expose a component property in Experience builder, define the property in the component’s JavaScript class using the @api decorator.

See Also