Step List Item
A step list item is one step in a step list with a status of waiting, in-progress, finished, or error. It uses a semantic <li> element and emits data-status so consumer CSS can render the visual indicator.
A step list item is one step in a step list with a status of waiting, in-progress, finished, or error. It uses a semantic <li> element and emits data-status so consumer CSS can render the visual indicator.
<div class="step-list-item" aria-label="one step in a step list with status of waiting, in progress, finished, or error">StepListItem</div><script lang="ts">
import StepList from '../StepList/StepList.svelte';
import StepListItem from './StepListItem.svelte';
</script>
<StepList label="Checkout" current={1}>
<StepListItem status="finished">Cart</StepListItem>
<StepListItem status="in-progress" current label="Step 2 of 3: Shipping">
Shipping
</StepListItem>
<StepListItem status="waiting">Payment</StepListItem>
</StepList>
// In your Svelte component:
import StepListItem from "lily-design-system-svelte-headless/components/StepListItem/StepListItem.svelte";
<StepListItem>
<!-- StepListItem content -->
</StepListItem>
<StepListItem status="in-progress" current>Address</StepListItem>
<StepListItem status="error" label="Payment failed">
<strong>Payment</strong>
<span>Card declined</span>
</StepListItem>
Step List Item is the child of Step List in the *List/*ListItem pattern. See StepList for full usage.
status: "waiting" | "in-progress" | "finished" | "error" (default: "waiting") -- emitted as data-statuscurrent: boolean (default: false) -- when true, renders aria-current="step"label: string (optional) -- aria-label overridechildren: slot -- step content (typically title and description)...restProps: any additional HTML attributes<li> element provides list-item semanticsaria-current="step" is set when current is truearia-label is set when label is provideddata-status is a CSS hook for status-driven stylingerror status to flag a step that requires correction.current for the user's active step.<ol> parent provides correct list semantics.Renders a <li> with no styling. The status indicator (icon, color, connector line) and any visual layout are the consumer's responsibility.
Consumer CSS targets the step-list-item class. Use data-status to distinguish waiting/in-progress/finished/error visual states.
<li> element with class step-list-itemdata-status reflects the status prop (default "waiting")aria-current="step" is set when current is true and absent when falsearia-label equals the label prop when providederror status to signal a failed step. Pair current with the parent's current index for consistent ARIA and CSS state.<li class="step-list-item"> elementdata-status reflects the status prop (default "waiting")aria-current="step" is set when current is truearia-label is set when the optional label prop is providedstep-list — an ordered list of step items showing progress through a multi-step processGenerated from this component's canonical metadata — the machine-checked source the implementations are held to.
status: "waiting" | "in-progress" | "finished" | "error" (default: "waiting")current: boolean (default: false)label: string (optional)children: slot...restProps: any additional HTML attributes