How do you expose LWC components in Experience Cloud?
Suggested answer
To make an LWC component available in Experience Builder, configure the component's metadata:
1. In the *.js-meta.xml file, set isExposed to true.
2. Add the appropriate targets — for Experience Cloud, use lightning__CommunityPage (appears on any community page), lightning__CommunityDefaultPage, or lightning__CommunityThemeLayout for theme layout components.
3. Define targetConfigs per target to specify which component properties can be configured in the Builder properties panel.
4. Audience Targeting can be applied to LWC components in Experience Builder — by enabling audience visibility on the component placement, different audiences see different component instances with different configurations.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.