Skip to content

Tutorials with progress

Turn a list of steps into a tutorial readers can tick off, with a progress bar and a next page.

Updated

TutorialStep 1 of 3

Add progress to <Steps>, and readers get a Done box on each step, a bar that counts them, and a panel when they finish. Their progress is kept in their own browser, page by page.

  1. Write the page

    Create the file and give it a title.

  2. List it

    Add its path to a group in docs.json.

  3. Publish it

    Open a pull request, and merge it.

Tick the boxes. The bar stays at the top as you scroll, and when every step is done, the panel at the foot of the page offers the next page. Start over clears the boxes.

MDX
<Steps progress>
<Step title="Write the page">
Create the file and give it a title.
</Step>
<Step title="List it">
Add its path to a group in `docs.json`.
</Step>
</Steps>

To make every <Steps> on a page a tutorial, set tutorial: true in the page’s frontmatter instead:

MDX
---
title: "Quickstart"
tutorial: true
next: ["guides/deploy"]
---

The Quickstart is a tutorial. Each box is named after its step’s title, so give every step one, or a screen reader only hears “Step 1”.

progressbooleanpath

On <Steps>: gives that list’s steps Done boxes. The bar counts every box on the page.

tutorialbooleanpath

In frontmatter: tracks every <Steps> on the page.

nextstring | string[]path

In frontmatter: the pages the finish panel links to, as paths from the docs folder, such as guides/deploy. Without it, the panel links to the next page in the same tab.

A page the reader finishes is marked as read in the sidebar. Plain <Steps> on a page that isn’t a tutorial has no boxes, no bar and no panel.

Was this page helpful?

Report a problem

What’s the problem?

The docs team sees this. Other readers don’t.