Newer Version Available

This content describes an older version of this product. View Latest

Display Flow Stages with a Lightning Component

If you've added stages to your flow, display them to flow users with a Lightning component, such as lightning:progressindicator.

This release contains a beta version of flow stages that is production quality but has known limitations. To provide feedback and suggestions, go to IdeaExchange.

Note

To add a progress indicator component to your flow, you have two options:
  • Wrap the progress indicator with a lightning:flow component in a parent component.
    1<aura:component>
    2   <lightning:progressindicator/>
    3   <lightning:flow/>
    4</aura:component>
  • Add the progress indicator to your flow screen directly, by using a Lightning component screen field.

It's easier to get labels for the active and current stages in a flow from the lightning:flow component.

  • Wrapper component: The onstatuschange action in the standard lightning:flow component returns the names and labels for the flow's active stages and current stage.
  • Lightning component screen field: You can only pass the fully resolved stage name into a Lightning component. If your flow is namespaced, the fully resolved name is namespace.flowName:stageName. Otherwise, it'sflowName:stageName.

    Depending on your naming convention, you can convert the stage names into labels by dropping the namespace and flow name, then replacing underscores with spaces.