Steps

Steps wraps a set of Step children in an ordered list styled with a left-rail and centered numbered badges. Use it for install / setup / migration guides where the reader is meant to work top-to-bottom.

Basic use

  1. Install the CLI
    Run dotnet tool install -g ShellDocs.CLI --prerelease.
  2. Scaffold
    shelldocs init MyDocs produces docs/MyDocs.Docs/ with a working site.
  3. Run
    shelldocs dev hot-reloads on .md, .razor and .cs edits.
<Steps>
<Step Title="Install the CLI">
Run <code>dotnet tool install -g ShellDocs.CLI --prerelease</code>.
</Step>
<Step Title="Scaffold">
<code>shelldocs init MyDocs</code> produces <code>docs/MyDocs.Docs/</code> with a working site.
</Step>
<Step Title="Run">
<code>shelldocs dev</code> hot-reloads on .md, .razor and .cs edits.
</Step>
</Steps>

Titleless steps

Title is optional : drop it for a bare numbered bullet.

  1. Fetch the changes.
  2. Run the migration.
  3. Verify the output.
<Steps>
<Step>Fetch the changes.</Step>
<Step>Run the migration.</Step>
<Step>Verify the output.</Step>
</Steps>

Rich step bodies

Written as an inline tag in the page, a Step takes a markdown body : fenced code, callouts, nested components. Leave a blank line between the tag and a fence. The rail extends through the full body.

  1. Add the package
    bash
    dotnet add package ShellDocs.Components --prerelease
    
  2. Register the services

    Add a line to Program.cs:

    csharp
    builder.Services.AddShellDocs();
    
  3. Verify
    Nested primitives work

    Callouts, cards, code groups : anything you can use in top-level prose also works inside a Step.

The source for that block:

markdown
<Steps>
<Step Title="Add the package">

```bash
dotnet add package ShellDocs.Components --prerelease
```

</Step>
<Step Title="Register the services">

Add a line to `Program.cs`:

```csharp
builder.Services.AddShellDocs();
```

</Step>
</Steps>

Use the inline form for real walk-throughs. Keep razor:preview for showing the component itself : fence bodies are Razor, so markdown inside them renders literally.

Props

Steps

Prop Type Default Description
ChildContent RenderFragment? — The Step children.

Step

Prop Type Default Description
Title string? — Optional title, rendered next to the numbered badge.
ChildContent RenderFragment? — Step body. Markdown when written as an inline tag, Razor inside a preview fence.

When to use

  • Multi-step install / setup instructions
  • Migration guides
  • "Here's what to do next" walk-throughs where each step depends on the previous

When not to use

  • Independent bullet list : use - or *
  • Cross-referencing a decision matrix : use TypeTable
  • One or two items : plain prose reads better than ceremony

See also