# StepIndicator

> Where the reader is in a flow spread over several pages, such as payee, amount and review: a numbered row of steps joined by a line, done steps checked and linkable back, the current one marked for assistive tech.

```ts
import { StepIndicator } from "@sdxc/ui";
```

Renders the row of steps as an ordered list in a `nav` spanning its container, so a
screen reader announces how many steps there are and which one is current.

## Examples

```tsx
<StepIndicator label="Transfer steps">
	<StepIndicator.Step number={1} state="complete" href="/transfer">Payee</StepIndicator.Step>
	<StepIndicator.Step number={2} state="current">Amount</StepIndicator.Step>
	<StepIndicator.Step number={3} state="upcoming">Review</StepIndicator.Step>
</StepIndicator>
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `label` | `string` | The landmark's name, such as "Transfer steps". |
| `children` | `RemixNode` | StepIndicator.Steps in order. |

Also accepts everything in `TagProps<"nav">`.


### StepIndicator.Step

Renders one step: its number (a check once done) in a circle, then its name, with a line leading in from the step before.

| Prop | Type | Description |
| --- | --- | --- |
| `number` | `number` | The step's place in the flow, from 1. |
| `state` | `"complete" \| "current" \| "upcoming"` |  |
| `href?` | `string` | The address of a done step, so the reader can go back and change it. |
| `children` | `RemixNode` | The step's name. |

Also accepts everything in `Omit<TagProps<"li">, "children">`.


## Types

| Name | Values | What it decides |
| --- | --- | --- |
| `State` | `"complete" \| "current" \| "upcoming"` | Where a step stands: behind the reader, where they are, or still ahead. |
