Steps

Steps are progress indicators of a sequence of task steps.

Add a container element with the step class. And add child elements with the step-item class. The step-item with the active class will be highlighted and indicate the current state of progress.

<script>
    import { Steps } from 'svelte-spectre'

    let steps = [
        {label: 'Step 1', href: '#', tooltip: 'tooltip'},
        {label: 'Step 2', href: '#', tooltip: 'tooltip'},
        {label: 'Step 3', href: '#', tooltip: 'tooltip'},
        {label: 'Step 4', href: '#', tooltip: 'tooltip'},
        {label: 'Step 5', href: '#', tooltip: 'tooltip'},
    ],
    active = 3
</script>

<Steps {steps} bind:active />
© 2022 — 2023 BASF SE

API Steps

steps: Step[] = []
interface Step
interface Step { label: string; href?: string; tooltip?: string; }
Step.label: string = ""
Step label
any string
Step.gref: string = ""
Step href
any url string
Step.tooltip: string = ""
Step tooltip
any string
active: number = 1
Active step
any number