Components
Documentation content

Stepper

Use stepper to display progress through stages. Its step children contain text labels. active identifies the current index: earlier stages display a checkmark, later stages remain pending, and an index beyond the last stage marks all stages complete. The model controls active; the stepper has no input events. For vertical events, see timeline.

stepper
A stage stepper rendered by the engine (light theme)
a completed step, the active step, and a pending step

Markup

active is required — a number or one {binding}. The component is also ejectable as a markup template when you need to own its shape.

<stepper active="{publish_step}">
  <step>Draft</step>
  <step>Review</step>
  <step>Publish</step>
</stepper>

Programmatic construction (Zig)

In a Zig view, the canvas.Ui builder constructs the same tree programmatically:

ui.stepper(.{ .active = model.publish_step }, &.{
    .{ .label = "Draft" },
    .{ .label = "Review" },
    .{ .label = "Publish" },
})

Eject

Use the eject command to copy stepper into your project when you need to change its structure. SDK updates preserve your copy. The command refuses to overwrite an existing file.

stepper ejects as a markup template (src/components/stepper.native).

native eject component stepper

The ownership model and what to do after ejecting are in Use, eject, or build.

Attributes

AttributeDescription
activestepper: the active step index (a number or one {binding}); earlier steps render completed, later ones pending. Required.
keySibling-scoped identity key.
global-keyParent-independent identity: ids survive reparenting between containers.
labelAccessible name; when set it REPLACES the element's text as the announced name - screen readers and automation snapshots see the label, never the text it shadows.