Step header

The title row for one stage of a flow, carrying the step count and the way back out.

Refined portVue source: WildStepHeader.vueReact component: WStepHeader, StepHeaderLevel

Try it

Step through with Next and the back arrow, with or without a tracker above.

Step 2 of 4, Add the logger

Count
Back
Tracker
<WildStepHeader
  :step="2"
  :total="4"
  backLabel="Back to Site"
  @back="goBack"
>
  Add the logger
</WildStepHeader>

When to use

  • Use it at the top of each stage of a flow, such as adding a site.
  • Show the count when people need to know how much is left.
  • Pair it with a progress tracker when the stages have names worth showing.
Don’t use it
  • For a page title outside a flow. Use a plain heading.
  • To show every step at once. Use Progress tracker.

Variants

Step 2 of 4, Add the logger

count and back

Step 1 of 4, Name the site

first step

Choose the inputs

title only
Leave out the back arrow on the first step, where there’s nowhere to go back to.

Content

  • Title each stage with what it asks for, in sentence case: Add the logger.
  • Name the step it returns to in the back label: Back to Site.
  • Match the count to the tracker’s steps, so the two never disagree.

Accessibility

The count is read as part of the heading: “Step 2 of 4, Add the logger”. When the step number changes, focus moves to the new title.

KeyWhat it does
TabMoves to the back button.
Shift + TabReaches the back button after a step change.
Enter / SpaceGoes back one step.

Props

PropTypeDefaultDescription
#defaultslot—The stage title.
stepnumber—1-based, as printed. Omit for no count.
totalnumber—Step count, printed after the step.
hideCountbooleanfalseHides the count line; focus still follows the step.
@back() => void—Adds the back button.
backLabelstring'Back'Names the back button for screen readers.
backDisabledbooleanfalseDisables the back button.
as'h1' | 'h2' | 'h3''h2'Heading level.
idstring—Heading id, for the form’s aria-labelledby.
focusOnChangebooleantrueFocuses the title when the step number changes.

Tokens

TokenValueWhere it lands
--global-neutral-grey-1300#0A090BTitle.
--global-neutral-grey-1000#4F4D55Step count.
--global-neutral-grey-900#7F7D83Back arrow at rest.
--global-neutral-grey-1200#1D1C20Back arrow on hover and press.
--global-neutral-grey-300#F1F1F1Back button hover fill.
--global-neutral-grey-400#ECECEDBack button press fill.
--global-neutral-grey-800#ADACB0Back arrow when disabled.
--global-blue-1000#1877F2Back button focus ring.