Configure a Component for Dynamic Interactions in the Lightning App Builder

It takes both admins and developers to make Dynamic Interactions work, but the keystone is a custom source component that defines the properties of the event to be triggered. Add event metadata and properties to your source component to expose the event to the Lightning App Builder, where an admin can then configure the targets and interactions for the event.

Only Lightning web components can be source components, but any component (Aura or LWC) can be a target. To expose an event from a source component, you fire a standard JavaScript CustomEvent in its .js file. To make the event discoverable, use Dynamic Interactions-specific metadata in the component js-meta.xml file, similar to how properties for builders are exposed.

For an overview of Dynamic Interactions, see Salesforce Help.

Dynamic Interactions uses two targetConfig subtags that you can put in your source component bundle’s componentName.js-meta.xml file to expose an event.

  • event
  • schema

These subtags are only available for a targetConfig with the target lightning__AppPage.

Here’s a sample js-meta.xml configuration file for an Account List source component. It includes an itemselected event, and its schema includes apiName and recordId as defined in the .js file.

  • Dynamic Interactions uses only type and properties from the schema. All other items in the schema are ignored.
  • The only supported property attributes are type, title, and description.
  • In the event schema, the only valid property types supported are String, Integer, and Boolean.
  • The event tag metadata isn’t validated against the .js file.

See Also