Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:
This is a pre-release version and is not production ready. For new and ongoing projects, please refer to the latest Design System version.
The stepped progression component provides an interactive visual overview of a process. It shows at a glance the amount of steps a user is required to go through, and serves as a guide for each step, indicating its status.
next.design-system.post.ch/?path=/docs/7dc546d9-e248-4d06-befe-3ad62fcd310f--docs&story=Default#7dc546d9-e248-4d06-befe-3ad62fcd310f--default
/?path=/story/7dc546d9-e248-4d06-befe-3ad62fcd310f--default&full=true
<nav aria-label="Registration Form"> <ol class="stepper"> <li class="stepper-item"> <a class="stepper-link" href="../step-1"> <span class="visually-hidden">Completed step:</span> Sender </a> </li> <li class="stepper-item"> <a class="stepper-link" href="../step-2"> <span class="visually-hidden">Completed step:</span> Product </a> </li> <li class="stepper-item" aria-current="step"> <span class="stepper-link" ><span class="visually-hidden">Current step:</span> Other details</span > </li> <li class="stepper-item"> <a class="stepper-link" href="../step-4"> <span class="visually-hidden">Next step:</span> Order summary </a> </li> </ol> </nav>
Make sure the @swisspost/design-system-styles
package is already present in your project or follow the installation guidelines.
To import all Design System styles:
@use '@swisspost/design-system-styles/post-compact.scss';
To import only the styles required for this component:
@use '@swisspost/design-system-styles/basics.scss'; @use '@swisspost/design-system-styles/components/stepper.scss';
You can use a stepper to allow users to navigate to specific steps.
To do so, use a
elements for the .stepper-link
of the steps you want to be navigable, and use span
for the steps you want not to be navigable.
Then, wrap the stepper inside a <nav>
.
However, it is better not to use an a
for the current step since the user is already on the page.
If you wish to display the stepper for informational purposes only, you can use <span>
elements for the .stepper-link
on all the steps.
In this case, there's no need to wrap the stepper inside a <nav>
.
next.design-system.post.ch/?path=/docs/7dc546d9-e248-4d06-befe-3ad62fcd310f--docs&story=Informational Stepper#7dc546d9-e248-4d06-befe-3ad62fcd310f--informational-stepper
/?path=/story/7dc546d9-e248-4d06-befe-3ad62fcd310f--informational-stepper&full=true
When dealing with longer labels that may wrap into multiple lines, it is recommended to use a title
attribute for the .stepper-link
.
This will truncate the label with an ellipsis if it exceeds two lines, while allowing the user to read the full label by hovering over it with the mouse.
next.design-system.post.ch/?path=/docs/7dc546d9-e248-4d06-befe-3ad62fcd310f--docs&story=Long Labels#7dc546d9-e248-4d06-befe-3ad62fcd310f--long-labels
/?path=/story/7dc546d9-e248-4d06-befe-3ad62fcd310f--long-labels&full=true