1. framework components
  2. steps

Steps

Use steps to guide users through a multi-step process.

Warning

This feature is currently marked as beta and not intended for production use. It may receive breaking changes before its stable release.

First do this.

Controlled

Use the step and onStepChange props to control state programmatically.

First do this.

Orientation

Using the orientation prop to control the layout.

First do this.

Direction

Set the text direction (ltr or rtl) using the dir prop.

First do this.

Anatomy

Here’s an overview of how the Steps component is structured in code:

svelte
<script lang="ts">
	import { Steps } from '@skeletonlabs/skeleton-svelte';
</script>

<Steps>
	<Steps.List>
		<Steps.Item>
			<Steps.Trigger>
				<Steps.Indicator />
			</Steps.Trigger>
			<Steps.Separator />
		</Steps.Item>
	</Steps.List>
	<Steps.Content />
	<Steps.PrevTrigger />
	<Steps.NextTrigger />
</Steps>

API Reference

Root

PropDefaultType
idsElementIds | undefined

The custom ids for the stepper elements

stepnumber | undefined

The controlled value of the stepper

defaultStepnumber | undefined

The initial value of the stepper when rendered. Use when you don't need to control the value of the stepper.

onStepChange((details: StepChangeDetails) => void) | undefined

Callback to be called when the value changes

onStepCompleteVoidFunction | undefined

Callback to be called when a step is completed

linearboolean | undefined

If `true`, the stepper requires the user to complete the steps in order

orientation"horizontal""horizontal" | "vertical" | undefined

The orientation of the stepper

countnumber | undefined

The total number of steps

dir"ltr""ltr" | "rtl" | undefined

The document's text/writing direction.

getRootNode(() => ShadowRoot | Node | Document) | undefined

A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.

elementSnippet<[HTMLAttributes<"div">]> | undefined

Render the element yourself

Provider

PropDefaultType
value() => StepsApi<PropTypes>

elementSnippet<[HTMLAttributes<"div">]> | undefined

Render the element yourself

Context

PropDefaultType
childrenSnippet<[() => StepsApi<PropTypes>]>

List

PropDefaultType
elementSnippet<[HTMLAttributes<"div">]> | undefined

Render the element yourself

Item

PropDefaultType
indexnumber

elementSnippet<[HTMLAttributes<"div">]> | undefined

Render the element yourself

Trigger

PropDefaultType
elementSnippet<[HTMLAttributes<"button">]> | undefined

Render the element yourself

Indicator

PropDefaultType
elementSnippet<[HTMLAttributes<"div">]> | undefined

Render the element yourself

Separator

PropDefaultType
elementSnippet<[HTMLAttributes<"div">]> | undefined

Render the element yourself

Content

PropDefaultType
indexnumber

elementSnippet<[HTMLAttributes<"div">]> | undefined

Render the element yourself

PrevTrigger

PropDefaultType
elementSnippet<[HTMLAttributes<"button">]> | undefined

Render the element yourself

NextTrigger

PropDefaultType
elementSnippet<[HTMLAttributes<"button">]> | undefined

Render the element yourself

View page on GitHub