Steps
Una barra de navegación que guía a los usuarios a través de los pasos de una tarea.
Cuándo usar
- Cuando una tarea dada es complicada o tiene una cierta secuencia en la serie de subtareas, podemos descomponerla en varios pasos para facilitar las cosas.
Uso de Ejemplo
Finalizado Esta es una descripción.
En Progreso Esta es una descripción.
En Espera Esta es una descripción.
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> Orientación Vertical
Los pasos también pueden renderizarse verticalmente usando la propiedad `orientation="vertical"`.
Finalizado Esta es una descripción.
En Progreso Esta es una descripción.
En Espera Esta es una descripción.
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
| Propiedad | Descripción | Tipo | Por defecto |
|---|---|---|---|
| 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
| Propiedad | Descripción | Tipo | Por defecto |
|---|---|---|---|
| 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 | - |