# Progress steps

Source: https://ecosphere.dev/docs/navigation/progress-steps (Ecosphere 1.5). Install `vue-ecosphere` for Vue 3 or `react-ecosphere` for React 18.2+/19: same components, props, markup and stylesheet.

The ordered steps of a long-running job, each with a state marker and badge; only the current step carries live counts. Replaces Stepper.

`import { EcoProgressSteps } from "vue-ecosphere"`

## Running: the current step, with live counts

The live block stays in the DOM and changes its text, so screen readers announce it. The bar is drawn only from a real count.

Vue (vue-ecosphere):

```vue
<EcoProgressSteps
  label="Catalogue import progress"
  :current="2"
  :steps="[
    { title: 'Upload the file' },
    { title: 'Read the pages' },
    { title: 'Extract prices',
      description: 'Find each product\'s price, unit and pack size, with the wording it came from.',
      count: '312 of 480 rows read', done: 312, total: 480,
      details: ['120 restored from saved progress', 'Working on: pages 19–24'] },
    { title: 'Review changes' },
    { title: 'Publish the price list' },
  ]"
  foot="Counts describe the current step. Earlier steps are inferred from the recorded stage, and no finish time is estimated."
/>
```

React (react-ecosphere):

```tsx
<EcoProgressSteps
  label="Catalogue import progress"
  current={2}
  steps={[
    { title: "Upload the file" },
    { title: "Read the pages" },
    { title: "Extract prices",
      description: "Find each product's price, unit and pack size, with the wording it came from.",
      count: "312 of 480 rows read", done: 312, total: 480,
      details: ["120 restored from saved progress", "Working on: pages 19–24"] },
    { title: "Review changes" },
    { title: "Publish the price list" },
  ]}
  foot="Counts describe the current step. Earlier steps are inferred from the recorded stage, and no finish time is estimated."
/>
```

## Stopped at a step

Vue (vue-ecosphere):

```vue
<!-- Stopped, waiting to retry and last reported are still the current step -->
{ title: 'Extract prices', state: 'error', count: '312 of 480 rows read', done: 312, total: 480,
  details: ['Page 21 could not be read. The rows read so far are saved.'] }
{ title: 'Extract prices', state: 'retry', … }   // with note="Waiting to retry from the last recorded step…"
{ title: 'Extract prices', state: 'stale', … }
```

React (react-ecosphere):

```tsx
// Stopped, waiting to retry and last reported are still the current step
{ title: "Extract prices", state: "error", count: "312 of 480 rows read", done: 312, total: 480,
  details: ["Page 21 could not be read. The rows read so far are saved."] }
{ title: "Extract prices", state: "retry", … }   // with note="Waiting to retry from the last recorded step…"
{ title: "Extract prices", state: "stale", … }
```

## Waiting to retry

## Last reported: no recent update

## Queued: not started yet

Every step is upcoming and none carries aria-current.

Vue (vue-ecosphere):

```vue
<EcoProgressSteps :steps="steps" note-icon="hourglass-line"
  note="Waiting for a worker to start. Nothing has been read yet." />
```

React (react-ecosphere):

```tsx
<EcoProgressSteps steps={steps} noteIcon="hourglass-line"
  note="Waiting for a worker to start. Nothing has been read yet." />
```

## Unknown: steps not recorded

## Finished

## Horizontal: a five-step form

Complete steps link back to their own URL (through the router with `to`). An optional step the form lets people skip ahead to is `reachable` and links while upcoming. Below 640px only the current title shows.

Vue (vue-ecosphere):

```vue
<EcoProgressSteps horizontal label="New price list" :current="step" :steps="[
  { title: 'Choose a supplier', to: { name: 'price-list-supplier' } },
  { title: 'Upload the catalogue', to: { name: 'price-list-upload' } },
  { title: 'Map the columns', to: { name: 'price-list-columns' } },
  { title: 'Check prices', to: { name: 'price-list-check' }, reachable: true },
  { title: 'Publish' },
]" />
```

React (react-ecosphere):

```tsx
<EcoProgressSteps horizontal label="New price list" as={Link} current={step} steps={[
  { title: "Choose a supplier", to: "/price-lists/new/supplier" },
  { title: "Upload the catalogue", to: "/price-lists/new/upload" },
  { title: "Map the columns", to: "/price-lists/new/columns" },
  { title: "Check prices", to: "/price-lists/new/check", reachable: true },
  { title: "Publish" },
]} />
```

## API

Vue (vue-ecosphere):

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `steps` | `EcoStep[]` | — | { title, state?, description?, count?, done?, total?, details?, badge?, href?, to?, reachable? }. Only the current step shows description, count, bar and details. |
| `step.href / step.to` | `string / string \| RouteLocationRaw` | — | Horizontal only: where a complete step links back to. `to` renders through RouterLink when vue-router is installed (a string falls back to a plain link without it). |
| `step.reachable` | `boolean` | false | Horizontal only: an upcoming step the form lets people skip ahead to; with href or to it links too, keeping its number. |
| `current` | `number` | -1 | Index of the current step. Earlier steps are done, later upcoming. -1: nothing started. |
| `step.state` | `"done" \| "current" \| "upcoming" \| "error" \| "retry" \| "stale" \| "unknown"` | — | Explicit state. error = Stopped here, retry = Waiting to retry, stale = Last reported, unknown = Not recorded. |
| `label` | `string` | — | Accessible name of the list. |
| `horizontal` | `boolean` | false | Numbered row for a multi-step form (steps--h in a nav). Complete steps with href or to become links, and so do reachable upcoming steps. |
| `note / noteIcon` | `string` | — / "information-line" | Explanation above the list when the markers cannot say it (#note slot). |
| `foot` | `string` | — | What the counts cover, or when it finished (#foot slot). |

React (react-ecosphere):

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `steps` | `EcoStep[]` | — | { title, state?, description?, count?, done?, total?, details?, badge?, href?, to?, reachable? }. Only the current step shows description, count, bar and details. |
| `step.href / step.to` | `string / string \| object` | — | Horizontal only: where a complete step links back to. With as (your router's Link) on EcoProgressSteps, a step with to renders it; without as, a string to becomes the href. |
| `step.reachable` | `boolean` | false | Horizontal only: an upcoming step the form lets people skip ahead to; with href or to it links too, keeping its number. |
| `current` | `number` | -1 | Index of the current step. Earlier steps are done, later upcoming. -1: nothing started. |
| `step.state` | `"done" \| "current" \| "upcoming" \| "error" \| "retry" \| "stale" \| "unknown"` | — | Explicit state. error = Stopped here, retry = Waiting to retry, stale = Last reported, unknown = Not recorded. |
| `label` | `string` | — | Accessible name of the list. |
| `horizontal` | `boolean` | false | Numbered row for a multi-step form (steps--h in a nav). Complete steps with href or to become links, and so do reachable upcoming steps. |
| `note / noteIcon` | `ReactNode / string` | — / "information-line" | Explanation above the list when the markers cannot say it: text or a node. |
| `foot` | `ReactNode` | — | What the counts cover, or when it finished: text or a node. |
