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
oroutputOnly
, use therole
attribute. For example, if a property is restricted tooutputOnly
, users can’t set its value from a Lightning record page. If you don’t specify therole
attribute, the default value allows input and output.
See the complete list of XML Configuration File Elements.
This sample component has four flow screen input fields. The startDate
property is set to inputOnly
. The name
property is set to the New Account
default value.
The component's JavaScript file must define the default value for the name
property to set the default value at run time.
See Also