# components/Steps (zidane-ui)

Import: `import { … } from 'zidane-ui'`. Source: [ui/src/components/Steps.tsx](https://github.com/Tahul/zidane/blob/main/ui/src/components/Steps.tsx).

## Components

### `Steps`

Component.

Renders the steps as an ordered list, a glyph per status. The status is
also spoken (screen readers hear "done", "failed"…).

```ts
function Steps(props: StepsProps): Element
```

**Parameters**

- `props` (`StepsProps`): [`StepsProps`](https://zidane.si/docs/reference/ui-components-steps.md#StepsProps).

**Returns** `Element`

**Props**

- `className?` (`string`): Extra classes on the list.
- `items` (`readonly StepsItem[]`): The steps, in order.
- `label?` (`string`): Accessible name of the list.
- `style?` (`CSSProperties`): Inline styles on the list.

Source: [ui/src/components/Steps.tsx:54](https://github.com/Tahul/zidane/blob/main/ui/src/components/Steps.tsx#L54)

## Interfaces

### `StepsItem`

Interface.

One step of [`Steps`](https://zidane.si/docs/reference/ui-components-steps.md#Steps).

```ts
interface StepsItem
```

**Properties**

- `detail?` (`ReactNode`): A line under the title.
- `id?` (`string`): A stable key. Default: the index.
- `status?` (`StepStatus`, default `'pending'`): How the step went.
- `title` (`ReactNode`): What the step is.

Source: [ui/src/components/Steps.tsx:14](https://github.com/Tahul/zidane/blob/main/ui/src/components/Steps.tsx#L14)

### `StepsProps`

Interface.

Props for [`Steps`](https://zidane.si/docs/reference/ui-components-steps.md#Steps).

```ts
interface StepsProps
```

**Properties**

- `className?` (`string`): Extra classes on the list.
- `items` (`readonly StepsItem[]`): The steps, in order.
- `label?` (`string`): Accessible name of the list.
- `style?` (`CSSProperties`): Inline styles on the list.

Source: [ui/src/components/Steps.tsx:29](https://github.com/Tahul/zidane/blob/main/ui/src/components/Steps.tsx#L29)

## Types

### `StepStatus`

Type.

How one step went.

```ts
type StepStatus = 'done' | 'active' | 'pending' | 'failed' | 'skipped'
```

Source: [ui/src/components/Steps.tsx:11](https://github.com/Tahul/zidane/blob/main/ui/src/components/Steps.tsx#L11)
