Steps

Numbered steps of a procedure, each with what to do and an optional screenshot.

When to use it

Procedures read in order: how to install, how to publish, how to book. Each step has a title, what to do and an optional screenshot.

When not to

Lists whose order does not matter (write a list in the text) and a single instruction.

Accessibility

An ordered list, so screen readers say the step's number and how many there are; the large numbers are drawn by the theme and are not read twice.

See it live

The component library shows this component in the default theme, in every variant: open it in the component library

The steps example as the component library shows it in the default theme

Fields

What the component’s dialog asks for. In a Doc, keyed rows start with the key; rows in order follow the order below. Each row is one item, its cells in the order of the fields.

Field

Key

Kind

Required

Title

title

Plain text, one line

Yes

Text

text

Text with headings, lists, links and bold

No

Image

image

An image from the assets, with its description

No

Variants

This component has no variants of its own; a theme can add some.

Warnings it can raise

The editor and the build say these when a block of this component needs a fix. All warnings are listed in the warnings reference.

Code

What it says

untitled_step

Step {number} has no title, so it is left out. Write what the step is in its first cell.

In Google Docs

A component is a table. Its first cell names it; the rows below hold its fields. This is the example table:

steps

Open the site

In the list of sites, choose Edit.

Publish

Choose Publish at the top, then Publish again.

In a page file

In a site kept as a folder or in Git, the same component is a block of the page’s JSON file:

JSON
{
  "name": "steps",
  "rows": [
    [
      "Open the site",
      "In the list of sites, choose Edit."
    ],
    [
      "Publish",
      "Choose Publish at the top, then Publish again."
    ]
  ]
}

Markup and classes

What the component writes takes these classes, for a theme’s CSS: the component’s own name, name__part for its parts and name--variant for each variant (the variant’s plain name is there too).

Class

What it marks

steps

The component

steps__image

A part of it

steps__step

A part of it

steps__text

A part of it

steps__title

A part of it

The HTML the example above writes, as the component library builds it in the default theme:

html
<ol class="steps">
  <li class="steps__step">
    <p class="steps__title">Open the site</p>
    <div class="steps__text"><p>In the list of sites, choose Edit.</p></div>
  </li>
  <li class="steps__step">
    <p class="steps__title">Publish</p>
    <div class="steps__text"><p>Choose Publish at the top, then Publish again.</p></div>
  </li>
</ol>

Extending it

Its files in SeedPage. A theme or a site changes the markup by giving a file of the same name (the Liquid part), and a new component can extend this one.

  • src/components/steps.js
  • src/components/steps/steps.liquid