sv-step
sv-step is one step of an sv-stepper, labelled by its content.
Usage
A step lives inside an sv-stepper, which sets its number and its states.
<sv-step variant="error"> Shipping <span slot="description">Address not found</span></sv-step>The marker shows the first of these that applies: the icon slot, a spinner with loading, the sign of variant, a check on a completed step, and the number.
Structure
divmarker
divlabel
divdescription
API References
Attributes
"completed"
Shows the step as completed, even after the current step.
"variant"
Colors the marker and shows a check, a warning sign, or a cross. It wins over completed and current.
"loading"
Shows a spinner in the marker in place of the number.
"disabled"
The user cannot click the step, and next() and previous() skip it.
"hidden"
The native hidden attribute. The stepper skips a hidden step and leaves it out of the numbers.
"attention"
Repeats an animation on the marker to draw the eye.
"progress"
Fills a ring around the marker and the line of the step to this percentage, from 0 to 100.
Slots
icon
An icon that replaces the number, the sign, and the spinner.
Default
The label of the step.
description
The text under the label.
CSS Properties
--sv-stepper-success-icon
Sign of a completed step and of variant="success", as an image whose shape the marker paints in the sign color, or none to hide it.
--sv-stepper-warning-icon
Sign of variant="warning", as an image whose shape the marker paints in the sign color, or none to hide it.
--sv-stepper-error-icon
Sign of variant="error", as an image whose shape the marker paints in the sign color, or none to hide it.
--sv-stepper-clr
Text color of the upcoming steps.
--sv-stepper-active-clr
Text color of the current and the completed steps.
--sv-stepper-description-clr
Text color of the description.
--sv-stepper-marker-sz
Size of the marker.
--sv-stepper-marker-bg
Background color of the marker of an upcoming step.
--sv-stepper-marker-clr
Color of the number in the marker of an upcoming step.
--sv-stepper-current-marker-bg
Background color of the marker of the current step.
--sv-stepper-current-marker-clr
Color of the number in the marker of the current step.
--sv-stepper-completed-marker-bg
Background color of the marker of a completed step.
--sv-stepper-completed-marker-clr
Color of the sign in the marker of a completed step.
--sv-stepper-success-clr
Color of the marker of a step with variant="success".
--sv-stepper-warning-clr
Color of the marker of a step with variant="warning".
--sv-stepper-error-clr
Color of the marker of a step with variant="error".
--sv-stepper-ln-clr
Color of the lines.
--sv-stepper-fill-clr
Color of the lines up to the current step, of the progress ring, and of the attention pulse.
--sv-stepper-ln-thickness
Thickness of the lines.
--sv-stepper-gap
Space around the marker and the lines.
--sv-stepper-dur
Duration of the animations, where one loop of the loading spinner and of the attention animation takes five times as long.
CSS Parts
::part(marker)
The circle that holds the number, the sign, the spinner, or the icon.
::part(label)
The box around the label.
::part(description)
The text under the label.
::part(line-end)
The line to the next step.
CSS States
:state(--current)
When the step is the current step.
:state(--past)
When the step comes before the current step.
:state(--first)
When the step is the first step that shows.
:state(--last)
When the step is the last step that shows.
:state(--clickable)
When the user can click the step.
:state(--collapsed)
When max of the stepper hides the step.
:state(--ellipsis)
When the step shows … for a run of collapsed steps.
:state(--vertical)
When the stepper stacks the steps in a column.
:state(--start)
When the label sits before the marker.
:state(--centered)
When the label is centered under or over the marker.
:state(--top)
When the label is centered over the marker.
:state(--dots)
When the stepper has dots.
:state(--no-line)
When the step draws no line, like the last step, or the first one with label-placement="start".