@md-plugins/md-plugin-steps

A markdown-it plugin for rendering wizard-like numbered step blocks.
5,161 4
Install
npm install @md-plugins/md-plugin-steps
Latest Version:2.2.0
License:MIT
Last Updated:Sep 16, 2026
Links: GitHub  ·  npm
Maintainer: hawkeye64

@md-plugins/md-plugin-steps

npm version npm downloads npm monthly downloads license

GitHub Sponsors button PayPal donate button

Discord X

A Markdown-It plugin that renders wizard-like numbered steps from Markdown headings or explicit step markers.

Use it for install flows, migration guides, tutorials, release checklists, or any docs page where readers need a clear sequence of actions.

Features

  • Registers a ::: steps container through markdown-it-container.
  • Turns top-level headings inside the container into numbered visual steps.
  • Preserves nested Markdown content such as lists, code fences, tables, and containers.
  • Supports alternate %step% marker syntax.
  • Provides themeable class names for Q-Press or custom docs sites.

Installation

Install the plugin via your preferred package manager:

# with pnpm:
pnpm add @md-plugins/md-plugin-steps
# with bun:
bun add @md-plugins/md-plugin-steps
# with Yarn:
yarn add @md-plugins/md-plugin-steps
# with npm:
npm install @md-plugins/md-plugin-steps

Usage

import MarkdownIt from 'markdown-it'
import { stepsPlugin } from '@md-plugins/md-plugin-steps'

const md = new MarkdownIt()

md.use(stepsPlugin)

Then author steps with headings:

::: steps

## Install package

Run the package manager command.

## Configure plugin

Add the plugin to your Markdown-It setup.

## Build docs

Run the docs build and inspect the output.
:::

Rendered output uses this general shape:

<div class="markdown-steps" role="list">
  <section class="markdown-step" role="listitem">
    <div class="markdown-step__marker" aria-hidden="true">1</div>
    <div class="markdown-step__content">
      <h3 class="markdown-step__title">Install package</h3>
      <p>Run the package manager command.</p>
    </div>
  </section>
</div>

Alternate marker syntax

You can also use %step% marker paragraphs when headings are not a good fit:

::: steps
%step% Install package

Run the package manager command.

%step% Configure plugin

Add the plugin to your Markdown-It setup.
:::

For new content, prefer headings because they are easier to read and edit.

Options

Option Type Default Description
containerName string 'steps' Container name registered with markdown-it.
stepsClass string 'markdown-steps' Class for the outer steps container.
stepClass string 'markdown-step' Class for each step item.
stepMarkerClass string 'markdown-step__marker' Class for the rendered step number.
stepContentClass string 'markdown-step__content' Class for the step body wrapper.
stepTitleClass string 'markdown-step__title' Class for the rendered step title.
headingLevels (2 | 3 | 4 | 5 | 6)[] [2, 3, 4, 5, 6] Heading levels that create new steps.
titleTag StepsTitleTag 'h3' HTML tag used for rendered step titles.
enableAlternateMarker boolean true Enables %step% marker support.
marker string '%step%' Marker string used by the alternate marker syntax.

Custom Classes

md.use(stepsPlugin, {
  stepsClass: 'docs-steps',
  stepClass: 'docs-step',
  stepMarkerClass: 'docs-step__marker',
  stepContentClass: 'docs-step__body',
  stepTitleClass: 'docs-step__heading',
  titleTag: 'h4',
})

Suggested CSS

.markdown-steps {
  display: grid;
  gap: 1.25rem;
}

.markdown-step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 1rem;
}

.markdown-step__marker {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: white;
  background: var(--q-primary, #1976d2);
  font-weight: 700;
}

.markdown-step__title {
  margin: 0 0 0.5rem;
}

Testing

To run the tests for this plugin, use the following command:

pnpm test

Support

If md-plugin-steps is useful in your workflow and you want to support ongoing maintenance:

License

This plugin is licensed under the MIT License. See the LICENSE file for details.

Related Packages

@md-plugins/md-plugin-image

A markdown-it plugin for handling images.

15,902 4
@md-plugins/md-plugin-inlinecode

A markdown-it plugin for handling inline code.

13,671 4
@md-plugins/md-plugin-frontmatter

A markdown-it plugin for handling frontmatter in markdown files.

13,642 4
@md-plugins/md-plugin-headers

A markdown-it plugin for handling headers (H1-H6).

13,577 4
@md-plugins/md-plugin-table

A markdown-it plugin for handling tables with custom tag and styles.

13,563 4

Version History

Version Released License
2.2.0 MIT
2.1.0 MIT
2.0.4 MIT
2.0.3 MIT
2.0.2 MIT
Pre-releases (10)
Version Released License
0.1.0-rc.19 MIT
0.1.0-rc.18 MIT
0.1.0-rc.17 MIT
0.1.0-rc.16 MIT
0.1.0-rc.15 MIT