Configure a Component for Flow Screens

To use a custom Lightning web component in a flow screen, add some metadata to the component’s configuration file.

The componentName.js-meta.xml file defines the metadata values for the component, including the design configuration for components intended for use in flow screens.

  • To make your component usable in a flow screen, add the lightning__FlowScreen target.
  • To add input fields to your component, add targetConfig properties.
  • To restrict a property to inputOnly or outputOnly, use the role attribute. For example, if a property is restricted to outputOnly, users can’t set its value from a Lightning record page. If you don’t specify the role attribute, the default value allows input and output.

See the complete list of XML Configuration File Elements.

This sample component has five flow screen input fields. The startDate property is set to inputOnly.

See Also