UI

Onboarding

Guide a new workspace or account through setup steps with a circular progress ring, inline actions, and a collapsible completed group.

import { OnboardingChecklist } from '@uthereal/ui/onboarding-checklist'

Onboarding checklist playground

Set up your workspace

1 of 4 done

  • Link a Git repository to run preview builds on every pull request.

Loading interactive preview…

Overview

OnboardingChecklist guides a user through a short, one-time account or workspace setup. A circular progress ring and rolling counter track completion. Expanding a step reveals its instructions, primary action button, and inline error slot. Checking a step fills the check from center, strikes through the title, waits briefly, and folds the row into a collapsible Completed group while advancing keyboard focus to the next remaining step.

Use OnboardingChecklist for three to eight setup tasks that users can complete in any order. Use Progress bar for a single measurable upload or background job, and Skeleton to reserve space while content loads.

Usage

'use client'
import { OnboardingChecklist } from '@uthereal/ui/onboarding-checklist'

export function WorkspaceSetup() {
  return (
    <OnboardingChecklist
      title="Set up your workspace"
      doneTitle="You're all set"
      steps={[
        {
          id: 'connect-repo',
          title: 'Connect a repository',
          description:
            'Link a Git repository to run preview builds on every pull request.',
          actionLabel: 'Connect GitHub',
          action: 'connect_repository',
        },
        {
          id: 'invite-team',
          title: 'Invite teammates',
          description: 'Add reviewers so your team can comment on previews.',
          actionLabel: 'Send invites',
          action: 'invite_teammates',
        },
        {
          id: 'verify-domain',
          title: 'Review default branch rules',
        },
      ]}
      onStepAction={async (stepId) => {
        await runSetupStep(stepId)
      }}
      onCompletedChange={(completed) => console.log(completed)}
    />
  )
}

Pass onStepAction to run an async task from the step button: resolving checks the step off, and throwing an Error keeps the step open and displays its message in an inline alert. For host-owned action dispatch without promises, pass onAction(action, stepId) and update completed or each step's status and error from application state.

Examples

Use <SchemaPlayground /> above to inspect the interactive setup flow, titles, labels, recipes, and themes. The examples below highlight non-default lifecycle states.

Step errors and pending work

Mid-progress checklists fold finished tasks into the Completed toggle while surfacing inline error alerts and pending step actions without blocking manual check-off on other steps.

Finish workspace setup

1 of 4 done

  • Add the TXT record to your DNS provider to activate branded links.

Completed and collapsed states

At 100% completion, the header title crossfades to doneTitle and a check draws inside the progress ring. Setting defaultHidden collapses the card body into a compact header bar that marks hidden content inert.

You're all set

3 of 3 done

Set up your workspace

1 of 3 done

API reference

Serializable schema arguments and defaults come directly from onboardingChecklistConfigSchema.

ArgumentType / defaultDescription
titlestringDefault: "Set up your workspace"Heading shown in the card header while at least one step remains unfinished.
doneTitlestringDefault: "You're all set"Heading shown in the card header once every step is complete; crossfades in place as the ring finishes.
stepsRequiredOnboardingStep[]—Ordered setup steps (1 to 12) with unique IDs. Each step supports a title, optional description, action button label, host action name, status, and inline error message.
defaultCompletedstring[]Default: []Step IDs initially marked complete and folded into the completed group. Initial state only; later edits do not reset a mounted instance.
defaultHiddenbooleanDefault: falseCollapse the checklist body to the header bar on first render. Initial state only; later edits do not reset a mounted instance.
completedLabelstringDefault: "Completed"Label shown beside the rolling count on the collapsible completed steps toggle.
hideLabelstringDefault: "Hide"Label on the header toggle button while the checklist body is visible.
showLabelstringDefault: "Show"Label on the header toggle button while the checklist body is hidden.
recipestudio | softDefault: "studio"Visual treatment. Both recipes use the same interaction behavior.
themeOnboardingChecklistTheme—Color mode, accent, and semantic design tokens for card surface, borders, ink, accent progress ring, radii, and elevation.
motionnone | subtle | expressiveDefault: "subtle"Spring and crossfade animation preset. System reduced-motion preferences replace travel with short fades; none makes folds and state changes immediate.
motionOptionsOnboardingChecklistMotionOptions—Overrides for step/body collapse transition and the settle delay (ms) before a checked step folds into Completed.
dirltr | rtl—Reading direction. Omit it to inherit the page direction.

React integration

PropPurpose
completed, onCompletedChangeControlled completed step IDs and change callback; omit completed to manage completion internally from defaultCompleted.
hidden, onHiddenChangeControlled collapsed state of the card body and change callback; omit hidden to manage visibility internally from defaultHidden.
onStepAction(stepId, action)Runs when a step's action button is pressed. Returning a promise shows a pending spinner, checks off on resolve, or shows an alert on rejection.
onAction(action, stepId)Host-owned action callback fired for steps with a named action when onStepAction is not provided.
presetComponent defaults overridden by explicit instance props.
tokens--ui-* CSS variables applied after the typed theme on the root <section>.
refRef to the rendered <section> element.
className, styleAdded to the root element; style wins over motion and theme tokens.
Native attributesForwarded <section> attributes including id and aria-* (excluding title, which sets the checklist heading).

Keyboard & accessibility

KeyInteraction
TabMoves between the header Hide/Show button, checkboxes, step titles, actions, and group toggle.
Arrow DownMoves focus to the next open step title, wrapping to the first.
Arrow UpMoves focus to the previous open step title, wrapping to the last.
Home, EndJumps focus to the first or last open step title.
Enter, SpaceToggles a checkbox, expands or collapses a step panel, runs a step action, or toggles a group.

The progress ring exposes role="progressbar" with aria-valuemin, aria-valuemax, aria-valuenow, and aria-valuetext="{done} of {total} steps done". Each step pairs a 40×40px role="checkbox" button (aria-checked) with an expandable title button (aria-expanded, aria-controls) and a role="region" panel. Step errors render inside a role="alert" paragraph, and completion changes announce through a polite role="status" live region.

When a step folds into Completed, leaving rows become inert so focus never lands on exiting elements, and focus moves to the next open step's action button (or title, or the Completed toggle if all steps are done). Unchecking a step from Completed returns focus to that step's checkbox. Hiding the checklist marks the collapsed body inert. Narrow containers (≤380px) collapse the Hide button to its chevron while preserving its accessible name. Directional arrows and strike-through animations mirror in RTL (dir="rtl"). Under forced-colors: active, borders, rings, checkboxes, and action buttons use system colors.

Motion and theming

Step rows, expanded panels, the Completed group, and the card body fold on a smooth spring with zero overshoot (motionTokens.spring.smooth). Check fills, chevrons, and action icons transition on the snappy spring, while the progress ring stroke and rolling digit columns follow the morph spring. Checking a step draws the check and strike-through, pauses for 720ms (motionOptions.settleDelay), and then folds the step into Completed.

Set motion="none" for zero-duration state changes with no 720ms fold delay and static spinners. Under prefers-reduced-motion: reduce, travel, blur, press scaling, and spinner rotation stop while short opacity fades and the settle beat remain.

theme accepts mode, accent, and tokens from the core, shape, and elevation groups plus borderStrong. UtherealProvider supplies application-wide defaults.

Composition

In agent compositions, OnboardingChecklist is a leaf. Register every step action on the host; handlers receive { componentId, itemId } where itemId is the step id. Completed step IDs persist at /components/instance-<id>/completed and card visibility persists at /components/instance-<id>/hidden. See Building with agents.

{
  "type": "OnboardingChecklist",
  "props": {
    "title": "Set up your workspace",
    "doneTitle": "You're all set",
    "steps": [
      {
        "id": "connect-repo",
        "title": "Connect a repository",
        "description": "Link a repository to deploy preview branches automatically.",
        "actionLabel": "Connect GitHub",
        "action": "connect_repository"
      },
      {
        "id": "invite-team",
        "title": "Invite teammates",
        "actionLabel": "Send invites",
        "action": "invite_teammates"
      }
    ]
  },
  "children": []
}

On this page