v1.2.0
  1. ds
  2. Components
  3. Steps

Steps

Progress through a flow: numbered, vertical and compact.

  1. Sourceorders-db
  2. Schema14 tables
  3. DestinationChoose a warehouse
  4. Schedule
  5. Review
Code
<ol class="steps" aria-label="New pipeline">
  <li class="done"><span>Source<small>orders-db</small></span></li>
  <li class="done"><span>Schema<small>14 tables</small></span></li>
  <li aria-current="step"><span>Destination<small>Choose a warehouse</small></span></li>
  <li><span>Schedule</span></li>
  <li><span>Review</span></li>
</ol>

An ordered list, so the count comes for free. Done steps are filled with a check and the line after them turns accent, the current step is ringed, and the rest are outlines. A small under each name says what was chosen, which saves going back to check. On a phone only the current step keeps its name.

Vertical

  1. Create a service account

    In Snowflake, create a user with key-pair auth and the role LOADER.

  2. Allow our IPs

    Add 13.232.40.0/24 and 13.232.41.0/24 to the network policy.

  3. Test the connection

    We read one row from INFORMATION_SCHEMA and write nothing.

  4. Pick a default schema
Code
<ol class="steps vert" aria-label="Connect a warehouse">
  <li class="done"><span>Create a service account</span><p>In Snowflake, create a user with key-pair auth and the role <code>LOADER</code>.</p></li>
  <li class="done"><span>Allow our IPs</span><p>Add 13.232.40.0/24 and 13.232.41.0/24 to the network policy.</p></li>
  <li aria-current="step"><span>Test the connection</span><p>We read one row from <code>INFORMATION_SCHEMA</code> and write nothing.</p><div class="btn-row"><button class="btn sm primary">Run test</button><button class="btn sm ghost">Back</button></div></li>
  <li><span>Pick a default schema</span></li>
</ol>

For setup guides where each step needs a sentence or a button. The rail runs down the left between the circles.

A failed step

  1. Build
  2. Test
  3. MigrateLock timeout
  4. Release
Code
<ol class="steps" aria-label="Deploy">
  <li class="done"><span>Build</span></li>
  <li class="done"><span>Test</span></li>
  <li class="err" aria-current="step"><span>Migrate<small>Lock timeout</small></span></li>
  <li><span>Release</span></li>
</ol>

Dots

  1. Welcome
  2. Invite your team
  3. Connect a source
  4. Done
Code
<ol class="steps dots" aria-label="Step 2 of 4">
  <li class="done"><span>Welcome</span></li>
  <li aria-current="step"><span>Invite your team</span></li>
  <li><span>Connect a source</span></li>
  <li><span>Done</span></li>
</ol>

For onboarding cards and dialogs where the names do not fit. The names stay in the markup for screen readers; the current dot stretches into a pill.

API

ClassOnWhat it does
.stepsolHorizontal steps with numbers and connecting lines.
.doneliCompleted: filled, with a check.
aria-current="step"liThe current step.
.errliA step that failed.
span > smallliA second line under the name.
.vert.stepsVertical, with a <p> and buttons under each step.
.dots.stepsDots only. Names are kept for screen readers.
Do
  • Three to six steps.
  • Let people go back to a done step.
  • Names that are nouns: Source, Schema, Schedule.
Don't
  • Steps for a single form. Show the form.
  • Hiding which step failed.
  • Numbering optional steps.

Accessibility

  • aria-current="step" is read out as "current step". Label the list with the name of the flow.
  • Done and failed are shown by shape as well as colour: a check and an exclamation mark.