Add the #DF24 Developer Keynote to your agenda. Join us in-person on 9/19 at 2:30 p.m. PT or on Salesforce+ at 5 p.m. PT for the must-see session built just for developers.

lightning__FlowScreen Target

Enables a component to be used on flow screens in Flow Builder.

Configures the component for flow screens and defines component properties. The targetConfigs tag contains at least one targetConfig tag.

Configures a component for flow screens with these attributes.

AttributeDescriptionRequired
targetsSpecify one or more page types in the targets attribute, such as <targetConfig targets="lightning__FlowScreen"> or <targetConfig targets="lightning__FlowScreen,lightning__AppPage">. The targets attribute value must match one or more of the page types that you listed under <targets>.Yes
configurationEditorRegisters a custom property editor for a flow screen component. A custom property editor is a Lightning web component that provides a custom UI for configuring a custom flow screen component’s input attributes. See Customize Action and Screen Component UI in Flow Builder.

The targetConfig tag includes at least one property tag. You can also include one or more propertyType tag.

Specifies a public property of a component that can be set in Flow 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
  • apex://namespace.Classname—An Apex class used for an Apex-defined data type. If the class is in the same namespace as the component, don't specify a namespace. If the class is in a managed package, specify the namespace of the managed package.
  • Date—A date in ISO 8601 format.
  • DateTime—A datetime in ISO 8601 format.
  • @salesforce/schema/namespace__Objectname or @salesforce/schema/Objectname—An object. See @salesforce modules.
Yes
defaultStringThe default value for the attribute.
descriptionStringDisplays as an i-bubble for the attribute in Flow Builder.
labelStringDisplays as a label for the attribute in Flow Builder.
requiredBooleanSpecifies whether the attribute is required. The default value is false.
roleStringSpecifies whether the attribute is inputOnly or outputOnly. If you don't specify the role attribute, the default value allows input and output. For example, if a property is restricted to outputOnly, users can't set its value from a Lightning record page. If you don't set the role attribute, or if you set it to inputOnly, the property is exposed in a custom property editor. If you set it to outputOnly, the property isn't exposed in a custom property editor.

Defines a data type to extend for component properties in flow screen components. Only generic sObject and sObject collection data types can be extended.

Use the propertyType tag with these attributes.

AttributeTypeDescriptionRequired
nameStringSpecifies the data type name to reference from each type attribute that is defined in a component’s property tag.Yes
extendsStringSpecifies the data type to extend for component properties.Yes
descriptionStringDescription of the property type.
labelStringLabel of the property type.

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

For more information, see these examples:

See Also