Steps

Show the current position and progress in a multi-step task.

Live preview
Interact with the component to see results here.
View code
HTML
<sy-steps
  current="1"
  start-index="0"
  type="horizontal"
  size="medium"
  clickable
  id="sample"
>
  <sy-step description="Enter the basic information.">Enter information
  </sy-step>
  <sy-step description="Review the entered information.">Review</sy-step>
  <sy-step description="The task is complete.">Complete</sy-step>
</sy-steps>

<script type="module">
  await (root => {
    const steps = root.querySelector('sy-steps');
    steps.addEventListener('selected', event => {
      steps.current = event.detail.index;
    });
  })(document);
</script>

Usage guide

#

Show ordered workflows, such as applications or setup. Use Tabs for independent view switching.

  1. Set steps and the current position

    current is zero-based by default.

  2. Set the starting number and completion state

    Setting startIndex to 1 makes both step numbers and current start at 1. Apply complete when the whole process finishes.

  3. Handle navigation requests

    Enable clickable and read selected.detail.index. Validate the current step before changing current.

Feature examples

#

Choose a feature from 22 topics. Explore property settings, method calls, event results, and slot layouts through live examples and code.

Usage examples · Item Overview

Try the selected example. Topics with multiple configurations let you switch between detailed examples.

View code
HTML
Loading the example.

Usage examples · Overview

Try the selected example. Topics with multiple configurations let you switch between detailed examples.

View code
HTML
Loading the example.

Property · Clickable

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Complete

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Current

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Clickable

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Current Status

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Current

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Description

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Disabled

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Index

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Last Step

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Loading

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Parent Status

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Size

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Small

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Status

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Item Attributes / Type

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Size

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Start Index

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Type

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Usage examples · Number steps from one

Start the displayed step numbers at one and highlight the second step.

View code
HTML
<sy-steps
  current="2"
  start-index="1"
  type="horizontal"
  size="medium"
  clickable
  id="sample"
>
  <sy-step description="Enter the basic information.">Enter information
  </sy-step>
  <sy-step description="Review the entered information.">Review</sy-step>
  <sy-step description="The task is complete.">Complete</sy-step>
</sy-steps>

<script type="module">
  const component1 = document.querySelector("#sample");
  Object.assign(component1, {
    "startIndex": 1,
    "current": 2
  });
  await (root => {
    const steps = root.querySelector('sy-steps');
    steps.addEventListener('selected', event => {
      steps.current = event.detail.index;
    });
  })(document);
</script>

API reference

#

Hover over a name or focus it with the keyboard to see the code. On touch screens, tap the name.

<sy-steps>

Properties

Attribute / PropertyTypeDefaultDescription
number0Index of the current step.
booleanfalseAllow user selection and emit the selected event.
booleanfalseMark every step as complete.
"horizontal" | "vertical""horizontal"Arrange steps horizontally (horizontal) or vertically (vertical).
"small" | "medium""medium"Component size.
number0Starting step number.

Slots

SlotDescription
Component body or child items.

<sy-step>

Properties

Attribute / PropertyTypeDefaultDescription
string""Description shown below the step title.
booleanfalseBlock user interaction and keyboard focus.
booleanfalseIndicate that processing is in progress.
"finish" | "current" | "wait" | "error" | "none""none"none derives the state from the current index. Set an individual state with finish, current, wait, or error.
booleanfalseLegacy compatibility property. Use size="small" to change the size.
booleanfalseAllow user selection and emit the selected event.
number0Item index calculated by the parent.
number0Index of the current step.
"small" | "medium""medium"Component size.
"finish" | "current" | "wait" | "error" | "none""none"Completion state passed down by the parent Steps component.
"finish" | "current" | "wait" | "error" | "none""none"Displayed step state, calculated from status and current.
"horizontal" | "vertical""horizontal"Horizontal or vertical layout, passed down by the parent Steps component.
booleanfalseHide the connector after the last step. Set by the parent.

Events

EventDetailDescription
CustomEvent<{ index: number; step: HTMLSyStepElement }>Requested step. Assign its index to the parent current after app validation.

Slots

SlotDescription
Component body or child items.