Skip to content
caliper ui pro docs

Cube flow

A four-step flow on the four sides of a cube. Continue turns one face away, Back turns it back, and from the last face the next turn comes round to the first, so starting over is one more turn, not a jump. The step list beside it shows where you are and reaches completed steps.

Pro

Create your account

Step 1 of 3

Name your team

Step 2 of 3

Choose a plan

Step 3 of 3

You are in

Workspace ready

Email
Name
Team
Plan

State

When to use

  • Short setup flows of three to five steps, such as creating a workspace.
  • Anywhere direction helps people remember where they are.

When not to use

  • Long forms or flows with branches; use the stepper.
  • Flows where people jump freely between steps.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/cube-flow

Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

CubeFlow

13 props
PropTypeDefaultDescription
label *string—Names the flow for screen readers, for example "Create a workspace".
steps *readonly CubeStep[]—Two to six steps; four make a cube. The last one is the finished face.
stepnumber—The index of the current step. Controlled when set.
defaultStepnumber0
onStepChange((step: number) => void)—
onComplete(() => void)—Called once when every step before the last has passed and the last face turns in.
onRestart(() => void)—Called when the last face turns back round to the first. Clear the values here.
restartLabelstring"Start over"
statusDepthStatus"ready"
messagesDepthMessages—
onRetry(() => void)—
disabledboolean—
classNamestring—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It is built on native elements and keeps aria-invalid, aria-label, aria-current, aria-hidden and aria-live in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/cube-flow.md

The index of every part is at /llms.txt.

More in Developer tools