Steps
A navigation bar that guides users through the steps of a task.
When To Use
- When a given task is complicated or has a certain sequence in the series of subtasks, we can decompose it into several steps to make things easier.
Example Usage
Finished This is a description.
In Progress This is a description.
Waiting This is a description.
astro
---
import Steps from '@/components/navigation/Steps.astro';
import Step from '@/components/navigation/Step.astro';
---
<Steps current={1}>
<Step title="Finished" description="This is a description." />
<Step title="In Progress" description="This is a description." />
<Step title="Waiting" description="This is a description." />
</Steps> Vertical Orientation
Steps can also be rendered vertically using the `orientation="vertical"` prop.
Finished This is a description.
In Progress This is a description.
Waiting This is a description.
astro
<Steps current={1} orientation="vertical">
<Step title="Finished" description="This is a description." />
<Step title="In Progress" description="This is a description." />
<Step title="Waiting" description="This is a description." />
</Steps> API Reference
Steps
| Property | Description | Type | Default |
|---|---|---|---|
| current | The current step, starting from 0. | number | 0 |
| orientation | The orientation of the steps layout. | 'horizontal' | 'vertical' | 'horizontal' |
| class | Additional CSS classes to apply to the Steps container. | string | - |
Step
| Property | Description | Type | Default |
|---|---|---|---|
| title | The main title of the step. | string | - |
| description | Additional detailed description of the step. | string | - |
| status | Explicit status of the step. Normally inferred from the `current` prop on the parent `<Steps>`. | 'wait' | 'process' | 'finish' | 'error' | - |
| class | Additional CSS classes for custom styling. | string | - |