Configure the Component Markup and Design Resource for a Flow Action

Make your custom Aura components available as flow local actions by implementing the lightning:availableForFlowActions interface.

We recommend that you omit markup from local actions. Local actions tend to execute quickly, and any markup you add to them will likely disappear before the user can make sense of it. If you want to display something to users, check out Customize Flow Screens Using Aura Components instead.

Tip

Here’s sample code for a simple “Hello World” component that sets a couple of attributes.

<aura:component implements="lightning:availableForFlowActions" access="global">
   <aura:attribute name="greeting" type="String" access="global" />
   <aura:attribute name="subject" type="String" access="global" />
</aura:component>

Mark your resources, such as a component, with access="global" to make the resource usable outside of your own org. For example, you want a component to be usable in an installed package or by a Lightning App Builder user or an Experience Builder user in another org.

Note

To make an attribute’s value customizable in Flow Builder, add it to the component's design resource. That way, flow admins can pass values between that attribute and the flow when they configure the corresponding Core Action element.

With this sample design resource, flow admins can customize the values for the “Hello World” component’s attributes.

<design:component>
   <design:attribute name="greeting" label="Greeting" />
   <design:attribute name="subject" label="Subject" />
</design:component>

A design resource describes the design-time behavior of a Lightning component—information that visual tools require to allow adding the component to a page or app. Adding this resource is similar to adding it for the Lightning App Builder.

When admins reference this component in a flow, they can pass data between the flow and the Aura component. Use the Set Input Values tab to set an attribute using values from the flow. Use the Store Output Values tab to store an attribute’s value in a flow variable.