Maturity: Developing
Usage
Completed steps get accessibility text marked with the
data-visually-hidden attribute, which needs a CSS rule. See
Visually hidden text.
With patch navigation:
<.steps current_step={0} label="Order process">
<:step on_click={JS.patch(to: ~p"/form/step/personal-information")}>
Profile
</:step>
<:step on_click={JS.patch(to: ~p"/form/step/delivery")}>
Delivery
</:step>
<:step on_click={JS.patch(to: ~p"/form/step/confirmation")}>
Confirmation
</:step>
</.steps>
With push events:
<.steps current_step={0} label="Order process">
<:step on_click={JS.push("go-to-step", value: %{step: "profile"})}>
Profile
</:step>
<:step on_click={JS.push("go-to-step", value: %{step: "delivery"})}>
Delivery
</:step>
<:step on_click={JS.push("go-to-step", value: %{step: "confirmation"})}>
Confirmation
</:step>
</.steps>