Navigation Core Stable

Stepper

A multi-step progress indicator where each step derives its own number and status — done, current, or upcoming — from its position in the sequence.

Preview

Installation

pnpm add fancy-ui-svelte
import { Stepper } from 'fancy-ui-svelte'

Usage

svelte
<script lang="ts">
  import { Stepper } from 'fancy-ui-svelte';
</script>

<Stepper />

Examples

Basic Usage

Vertical Stepper

Stacked in a column instead of a horizontal row.

Clickable Steps

Steps render as buttons a reader can click to jump between them.

With Descriptions

A secondary line under each step's label.

Props

PropTypeDefaultDescription
current number0The active step's 0-based index. Bindable.
onCurrentChange (current: number) => void-Called with the new index whenever it changes, however the change happened.
orientation "horizontal" | "vertical""horizontal"The rail's stacking axis.
clickable booleanfalseWhether steps render as buttons a reader can click to jump between them.
onStepClick (index: number) => void-Called with a step's index when it's activated by a click. Only fires when clickable.
class string-Additional CSS classes, merged onto the root.
ref HTMLOListElement | nullnullBindable reference to the root element.
Step.label *string-The step's primary label.
Step.description string-Optional secondary line shown under the label.
Step.class string-Additional CSS classes, merged onto the step's li.
Step.ref HTMLLIElement | nullnullBindable reference to the step's li element.

Slots

SlotDescription
childrenThe Steps.
Step.childrenOverrides the bullet's default content (checkmark / number / outline).