Display Flow Stages in a Flow Screen Component
To create a fully custom visual design for your flow’s progress indicator, or to maintain an existing custom stages component, you can build a screen component that renders stages by wiring it to the $Flow.ActiveStages and $Flow.CurrentStage global variables in Flow Builder.
To show stages in a standard path or steps style, use the built-in progress indicator instead. No custom component required. See Showing Users Their Progress in a Screen Flow.
You can define stages as resources with Flow Builder. Each stage has a label, an API name, and an order. Stages can be active by default, meaning they appear in $Flow.ActiveStages when a flow interview starts. You control which stage is current by updating $Flow.CurrentStage with assignment elements between screens.
Your screen component receives two values:
stages— the list of active stage labels, sourced from$Flow.ActiveStagesas aString[]currentStage— the label of the current stage, sourced from$Flow.CurrentStageas aString
The component declares stages and currentStage as @api properties and registers them in the component’s configuration file so Flow Builder can wire them to flow variables.
- Open your screen flow in Flow Builder.
- Define your stages as flow resources. In the Manager panel, click New Resource, select Stage, and enter a label and order for each stage. To include a stage in
$Flow.ActiveStagesat the start of the flow interview, select Active by default. - On each screen element that should show the progress indicator, add the custom stages component.
- For the Stages property, enter
{!$Flow.ActiveStages}. For the Current Stage property, enter{!$Flow.CurrentStage}. In the Advanced section, select Manually Assign Variables. - Between each pair of screen elements, add an assignment element that sets
$Flow.CurrentStageto the label of the next stage.
See Also