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.
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.
When to use
Anatomy
Steps: the ordered list.currentsets the current step, counted from 1.Step: one step: a 20px square marker with its number in Space Mono, a title, and an optionalsubtitle: data under the title, what the step does or holds (childrenreplace it). The prop wasdescription;codemods/helper-text-renames.mjsrenames it. A shortline-seamconnects 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
States
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 withflex-basis: autoand 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.
Stepsrenders anol; name it witharia-labelafter the flow ("Setup"). - The current step gets
aria-current="step". - A finished or failed step reads
finishLabelorerrorLabelafter 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
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
Also takes the attributes of its element.
Step
Also takes the attributes of its element.
Steps
Also takes the attributes of its element.
Related
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 inMessageRepliesSummary, a mention of you (MessageReferenceText variant="primary"), and theStepsnumber. - 0.103.0 · Breaking ChangesData parts named for what they hold:
SearchEntityResultDescription→SearchEntityResultSubtitle,PreviewCardDescription→PreviewCardSubtitle,TaskCardDescription→TaskCardSubtitle,MobileNavServerPopoverRowDescription→MobileNavServerPopoverRowSubtitle(and their…Propstypes), andStep'sdescriptionprop →subtitle. Their look anddata-slotvalues are unchanged. - 0.10.0 · Changed
Tooltip,ComboboxSelectoptions,StepsandTimelineuse 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:
Badgeuppercase;Checkboxsize,variant,color;Statuspulse,attention(status never animates);Switch/SwitchThumbsize;SidebarItemvariant;SidebarItemCount/SidebarItemIndicatorvariantandappearance(the count is always the pink sticker, the indicator the yellow @);NotificationCenterActionButtonvariant;DrawerContentwidth(one-go forms use the wideDialog);AppRailItemIndicatorattention;AppRailItemAttentionchildren;Stepssize,track,renderIndicator,renderTraveler;FilePreviewBadgetype,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.OtterIndicatorstays as a standalone illustration. - 0.6.0 · FixedHorizontal
Stepsdraw their connector (the column was 0px wide). - 0.5.58 · Added
StepstakesrenderTraveler(state)ontrack="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-durationand the new--r-steps-traveler-rest-duration(0s under reduced motion). The plain river track is unchanged. NewStepTravelerStatetype. - 0.5.57 · Added
OtterIndicator: an otter step marker forStepsrenderIndicator, taking a stepstatus(waitsleeps on the dry bank,processpaddles on its back,finishhugs its parcel,errorshivers as the parcel floats off). Use withtrack="river"and--r-steps-indicator-size: 48px; its CSS now ships in the published package.