Raft Design System

Components · Navigation

Steps

Where someone is in a short flow of 3 to 5 steps — finished steps in ink, the current step as a yellow sticker, the steps ahead outlined.

StableAlso called Stepper
import { Steps } from "@botiverse/raft-ui";

Steps show where someone is in a short flow of 3 to 5 steps, such as setting up a server. Finished steps are ink, the current step is a yellow sticker, and the steps ahead are outlined.

steps/compositions/preview

When to use

SituationUse
A flow of 3 to 5 steps taken in orderSteps
A flow of more than 5 stepsSplit it into 2 flows, each with its own Steps
How far one operation has gotProgress
Sections people visit in any orderTabs
The step label of a server's setup ("Set up your server")A line of Space Mono in the dialog's header, not Steps; see Onboarding

Anatomy

  • Steps: the ordered list. current sets the current step, counted from 1.
  • Step: one step: a 20px square marker with its number in Space Mono, a title, and an optional subtitle: data under the title, what the step does or holds (children replace it). The prop was description; codemods/helper-text-renames.mjs renames it. A short line-seam connects it to the next step.
  • OtterIndicator: the Ottie illustration with one pose per status, at 40px or larger. It is decorative; put the status in nearby text. Resting and quiet typing loop, while a puzzled head tilt and a celebratory hop play once. This is a narrow illustration exception to the motion rule; presence lights remain still.

Variants

VariantUse for
A row (default)Most flows
verticalThe steps in a column
Clickable (onUpdateCurrent)A flow where people can return to an earlier step. A disabled step can't be selected
Custom marks (icon, finishIcon, errorIcon)An icon in place of a step's number, check or cross
steps/compositions/vertical
steps/compositions/clickable
steps/compositions/icon

States

statusLook
waitAhead: a line-seam outline on paper, the title in foreground-hint
processCurrent: a yellow sticker with an ink number
finishFinished: solid ink with a check
errorFailed: an orange sticker with a cross, because something going wrong is orange (Color)
steps/compositions/status

Behavior

  • A row of steps fills its row and switches on its own width, not the window's (Switch on the region's width). Below 40rem (640px) of its own width each step stacks its text under its marker and the steps share the width, the titles wrapping; so it does in a dialog or a 400px panel on a wide window as on a phone. From 40rem the titles sit beside their markers, and a row too long for its width wraps onto a second line. Put it in a parent with a definite width (a block, a stretched flex or grid item, or a set width), not one that shrinks to its content (inline-block, w-fit, an absolutely positioned box or floating layer with no width, a flex item with flex-basis: auto and no width): as its own container it takes no width from what it holds and would collapse to nothing.
  • Where the row is too narrow for every title, show only the current step's title.

Content

  • Title each step with a short noun phrase: Your team, Computer, First agent. Use sentence case, whether or not the steps are clickable (Typography).

Accessibility

  • Steps is not built on a Base UI primitive. Steps renders an ol; name it with aria-label after the flow ("Setup").
  • The current step gets aria-current="step".
  • A finished or failed step reads finishLabel or errorLabel after its title, because its mark says it only by look.
  • In clickable steps, each title is a button, described by the step's subtitle.

Ottie illustration

steps/compositions/otter

Use the same round Ottie character and warm watercolor palette in all four poses: half-side-lying while waiting, occasional quiet typing while working, a head tilt followed by a question mark on error, and one small hop on completion. Do not replace the character with a differently drawn otter, or use this illustration as a presence light. The consumer decides which status to pass.

Animation pauses outside the viewport and while the document is hidden. A shared observer handles every illustration; there is no animation timer or per-frame React update. Reduced motion shows the resting/typing still and the final error/finish pose. Re-entering the viewport resumes a paused action; changing status starts its new action.

The transparent WebP artwork is shared by instances and loaded only for the rendered status. It is fixed brand art, rather than a theme color: the same golden fur, cream muzzle and brown paws appear in light and dark mode. The frame sheets are optimized for small illustrations; avoid enlarging them beyond 128px.

API

OtterIndicator

Ottie resting, quietly typing, tilting its head or celebrating. Wait/process loop only while visible. Error/finish play once on entry. Reduced motion shows a still pose. Give it an explicit square box, 40px or larger. Decorative by default; the consumer supplies the nearby status text.
PropTypeDefault
status (required)StepStatus

Also takes the attributes of its element.

Step

One step in `Steps`: a numbered marker, a title and a subtitle.
PropTypeDefault
disabledKeeps the step from being clicked when the steps are clickable.booleanfalse
iconReplaces the number of a step that is waiting or in progress.ReactNode
statusOverrides the status the step gets from `current`.StepStatus
subtitleData under the title: what the step does or holds. `children` override it.ReactNode
titleReactNode

Also takes the attributes of its element.

Steps

Numbered steps through a process, as an ordered list of `Step`s. Each child is numbered by its position; the step at `current` gets `aria-current="step"`.
PropTypeDefault
currentThe current step, counted from 1. Steps before it are `finish`, after it `wait`, and the current one takes `status`. Leave it unset with `defaultCurrent` to let clicks move it.number
defaultCurrentInitial current step when uncontrolled.number
errorIconReplaces the cross of failed steps.ReactNode
errorLabelScreen-reader text read after a failed step's title.string"Failed"
finishIconReplaces the check mark of finished steps.ReactNode
finishLabelScreen-reader text read after a finished step's title.string"Completed"
onUpdateCurrentCalled with the clicked step's number. Setting it turns every step that isn't `disabled` into a button.(current: number) => void
statusStatus of the current step.StepStatus"process"
verticalLays the steps out in a column instead of a row.booleanfalse

Also takes the attributes of its element.

Changes

  • 0.107.3 · Design SystemA sticker's ink edge follows its size ([Shape › Stroke widths](https://raft-design.botiverse.build/foundations/shape/#stroke-widths)): a sticker that carries a label (a number, a word, or an icon that stands for one) and is under 24px tall takes a 1px ink edge, and in dark mode a 1px die-cut edge outside it. A larger sticker, or one with no label that relies on its edge for its shape, keeps 1.5px: buttons, the selected row, tab and segment, avatars and their corner marks (and an avatar stack's +N count), status pixels and attention dots. Changed in this release: Badge (appearance="solid"), SidebarItemCount, SidebarItemIndicator, AppRailItemBadge, the new count in MessageRepliesSummary, a mention of you (MessageReferenceText variant="primary"), and the Steps number.
  • 0.103.0 · Breaking ChangesData parts named for what they hold: SearchEntityResultDescription → SearchEntityResultSubtitle, PreviewCardDescription → PreviewCardSubtitle, TaskCardDescription → TaskCardSubtitle, MobileNavServerPopoverRowDescription → MobileNavServerPopoverRowSubtitle (and their …Props types), and Step's description prop → subtitle. Their look and data-slot values are unchanged.
  • 0.10.0 · ChangedTooltip, ComboboxSelect options, Steps and Timeline use the type scale instead of fixed sizes, so they follow the desktop values.
  • 0.6.0 · Breaking ChangesProps that no longer change anything are removed: Badge uppercase; Checkbox size, variant, color; Status pulse, attention (status never animates); Switch / SwitchThumb size; SidebarItem variant; SidebarItemCount / SidebarItemIndicator variant and appearance (the count is always the pink sticker, the indicator the yellow @); NotificationCenterActionButton variant; DrawerContent width (one-go forms use the wide Dialog); AppRailItemIndicator attention; AppRailItemAttention children; Steps size, track, renderIndicator, renderTraveler; FilePreviewBadge type, color. Remove them at call sites.
  • 0.6.0 · Breaking ChangesParts and exports removed: TabsBackground, TabsIndicator, MessageReferenceBadge, AppRailItemAttentionMask, IslandIndicator, OtterTraveler, tabsRecipe, taskStatus, taskStatusBorder, SidebarItemVariant, FilePreviewBadgeColor, FilePreviewBadgeType, StepIndicatorState, StepsSize, StepsTrack, StepTravelerState. OtterIndicator stays as a standalone illustration.
  • 0.6.0 · FixedHorizontal Steps draw their connector (the column was 0px wide).
  • 0.5.58 · AddedSteps takes renderTraveler(state) on track="river": one traveler (drawn from { index, status }) swims upstream from marker to marker. With a traveler each step after the first is the reach that leads into its marker, the river is full all along and runs back toward the first step, and the markers look as the traveler has got to them: it lands at each finished marker in turn (never skipping one), rests and sets off again, so a marker never shows finished ahead of it. Leg timing comes from --r-steps-traveler-arrive-duration and the new --r-steps-traveler-rest-duration (0s under reduced motion). The plain river track is unchanged. New StepTravelerState type.
  • 0.5.57 · AddedOtterIndicator: an otter step marker for Steps renderIndicator, taking a step status (wait sleeps on the dry bank, process paddles on its back, finish hugs its parcel, error shivers as the parcel floats off). Use with track="river" and --r-steps-indicator-size: 48px; its CSS now ships in the published package.