{"name":"steps","title":"Steps","description":"","kind":"component","category":"navigation","status":"beta","props":{"items":{"type":"array","description":"The steps in order: { title, description?, content? } (React: nodes; content is the step's panel)."},"step":{"type":"number","model":true,"default":0,"description":"The current step, from 0; the number of steps means every step is done. React: step / defaultStep / onStepChange."},"orientation":{"type":"enum","values":["horizontal","vertical"],"default":"horizontal"},"linear":{"type":"boolean","default":false,"description":"The steps are taken in order: only Back and Next move; the markers are not pressable."},"controls":{"type":"boolean","default":false,"description":"Show the Back and Next buttons under the panels."},"prevLabel":{"type":"string","default":"Back"},"nextLabel":{"type":"string","default":"Next"},"completed":{"type":"string","description":"What shows once every step is done (React: a node)."}},"playground":{"name":"Playground","props":{"orientation":"horizontal","linear":false,"controls":true,"step":1,"nextLabel":"Continue","completed":"web-app is live on Production.","items":[{"title":"Repository","description":"From GitHub","content":"northwind/web-app, 1,284 commits on main."},{"title":"Configure","description":"Build and env","content":"Next.js detected. Build with pnpm build, output .next."},{"title":"Deploy","description":"Production","content":"The first deploy builds main and gives it a URL."}]},"width":360},"exampleFiles":[{"file":"create-project","title":"Create a project"},{"file":"deploy-progress","title":"Deploy progress, read-only"},{"file":"import-members","title":"Import members with your own buttons"}],"worstCase":[{"name":"Long titles wrap","width":360,"props":{"step":1,"items":[{"title":"Reconcile the supplier invoices for the third quarter","description":"averyveryveryverylongunbrokendescriptionwithoutanyspaces"},{"title":"B"},{"title":"Publish the reconciled ledger to the finance workspace"}]}},{"name":"Many steps, narrow","width":288,"props":{"step":4,"items":[{"title":"1"},{"title":"2"},{"title":"3"},{"title":"4"},{"title":"5"},{"title":"6"},{"title":"7"},{"title":"8"}]}},{"name":"Right-to-left","width":360,"props":{"step":1,"controls":true,"prevLabel":"السابق","nextLabel":"التالي","items":[{"title":"الحساب","description":"الاسم والبريد","content":"أخبرنا من أنت."},{"title":"مساحة العمل","content":"سمِّ مساحة العمل."},{"title":"الدفع"}]}},{"name":"Vertical, long text","width":240,"props":{"orientation":"vertical","step":1,"items":[{"title":"Quarterly supplier reconciliation for the northern region","description":"12,480 rows checked against the purchase orders"},{"title":"Review"},{"title":"Publish"}]}},{"name":"One step","width":240,"props":{"items":[{"title":"Only step"}]}}],"anatomy":[{"part":"root","element":"div","description":"Ark's steps root (data-orientation, --percent): a column, the list then the panels then the controls, 16px apart."},{"part":"list","element":"div","description":"role=tablist (aria-orientation). Horizontal: a row of equal columns. Vertical: a column."},{"part":"item","element":"div","description":"One step (data-complete, data-current, data-incomplete). Horizontal: an equal share of the row; the trigger (marker, then the text under it) and the rail. Vertical: the trigger, the rail under the marker, 20px to the next step."},{"part":"trigger","element":"button","description":"role=tab, aria-selected and aria-current=step on the current one: the marker and the step's text. Bleeds 6px so the marker lines up with the edge; control radius; hover fills hover (fine pointer), press hover-2 (a row's press), focus ring. linear: not pressable (no hover, no press) and only the current step is in the tab order."},{"part":"indicator","element":"div","description":"The 24px round marker (aria-hidden). To do: 1px line-strong ring, ink-2 figure. Current: ink fill, on-ink figure. Done: the task rows' mark, green fill and a 13px white check."},{"part":"number","element":"span","description":"The step's figure, 10.5px/600 tabular, as the task rows' step; gives way to the check when done."},{"part":"check","element":"span","description":"The done check (ph check, bold); arrives scaled from 0.5 with its opacity when the step is done, as the task rows' mark."},{"part":"text","element":"span","description":"The title and the description, stacked; horizontal: under the marker, 6px apart; vertical: beside it, its first line sharing the marker's 24px line."},{"part":"title","element":"span","description":"13px/500 on the body leading; vertical: its first line 24px tall (the marker's line): ink-2 to do, ink when current or done. Wraps, never cut. Author text keeps its own direction."},{"part":"description","element":"span","optional":true,"description":"12px ink-2 under the title; wraps."},{"part":"separator","element":"div","description":"The rail (between this step and the next; none after the last): 1px in the line colour, green once this step is done. Horizontal: from 6px after this marker to 6px before the next one, at the markers' middle. Vertical: down the marker column from 4px under the marker to 4px above the next one."},{"part":"content","element":"div","optional":true,"description":"role=tabpanel labelled by its trigger: the current step's panel (the others hidden), 13px ink-2; focusable (tabindex 0)."},{"part":"completed","element":"div","optional":true,"description":"What shows in place of the panels once every step is done (Next pressed on the last step)."},{"part":"footer","element":"div","optional":true,"description":"Back and Next: real Buttons (Back outline, Next primary, size sm), at the end, 8px apart, marked data-steps=\"prev\" / \"next\"; disabled where there is no step to go to."}],"events":{"stepChange":"(step: number) after a marker, Back or Next is pressed"},"states":["hover","press","focus-visible","current","complete","incomplete"],"tokens":["color.line","color.line-strong","color.ink","color.ink-2","color.on-ink","color.on-accent","color.green","color.hover","color.hover-2","color.accent","radius.control","text.xs","text.sm","duration.fast","duration.base","duration.press","easing.out-strong"],"a11y":{"role":"tablist (tab, tabpanel)","keyboard":["Tab reaches each marker in turn (linear: only the current one), then the current panel, then Back and Next","Enter / Space on a marker makes it the current step (not linear); the change is instant","Back / Next are buttons; a disabled one is skipped"],"notes":["The current marker carries aria-selected=true and aria-current=step; its panel is labelled by it.","A marker's name is its title and description; the figure and the check are hidden from assistive technology."]},"motion":["marker and rail colours over duration.base when a step changes (instant from the keyboard: kbd-instant)","check: scale 0.5 -> 1 with opacity over duration.press easing.out-strong and duration.base when a step is done (as the task rows' mark); the figure fades out under it. Undone (Back, an earlier marker): shorter and simpler, the check fades over duration.fast and its scale resets after the fade","reduced motion: the check does not scale, it fades both ways","trigger hover and press fills over duration.fast (hover gated to a fine pointer)","panels swap at once (no transition between steps' content)","first paint: nothing plays"]}