Skip to content
Component installs need the registry setup— the Base UI shadcn project, the @vegastack namespace and the Cloudflare Access service token.
VegaStack Design

Onboarding Checklist

A getting-started card — segmented progress and step rows, collapsible to a progress pill.

Status
stable
Since
0.3.0
Accessibility pattern
ARIA progressbar + checkboxes

Last updated

Getting started

1 of 4 steps completed

Install

Add Onboarding Checklist from the VegaStack registry. The CLI verifies the item's integrity hash before writing it.

pnpm dlx shadcn@latest add @vegastack/onboarding-checklist

The same command installs the registry items it composes: @vegastack/icon-button, @vegastack/progress-indicator.

Usage

<OnboardingChecklist title="Getting started" done={doneCount} total={6}>
  <OnboardingChecklistItem icon={<Mail />} done>
    Sync email account
  </OnboardingChecklistItem>
  <OnboardingChecklistItem icon={<BarChart3 />} onClick={openReports}>
    Create a report
  </OnboardingChecklistItem>
</OnboardingChecklist>

State model

The HOST owns completion (done per item + the done/total counts) and each step's action; the component owns layout, the progress maths, and the collapse-to-pill toggle (collapsed/defaultCollapsed/onCollapsedChange).

Anatomy

Onboarding Checklist is a compound component. Every exported part, with the data-slot it renders (generated from the canonical source):

OnboardingChecklist — data-slot="onboarding-checklist" | "onboarding-checklist-collapse"
OnboardingChecklistItem — data-slot="onboarding-checklist-item"

Examples

Getting started

1 of 4 steps completed

API Reference

OnboardingChecklist

PropTypeDefaultDescription
done*numberSteps completed (the host counts its own items).
total*numberTotal steps.
collapsedbooleanCollapsed state (controlled). Omit for uncontrolled with defaultCollapsed.
collapseLabelstring'Collapse checklist'Accessible label for the expanded-state collapse control.
defaultCollapsedbooleanfalseInitial collapsed state for uncontrolled use.
expandLabelstring'Expand checklist'Accessible label for the collapsed-state expand control.
onCollapsedChange((collapsed: boolean) => void)Called whenever the user requests a collapsed-state change.
titleReact.ReactNode'Getting started'Card heading.

Data attributes and CSS variables on OnboardingChecklist

AttributeValues
data-collapsed""
data-slot"onboarding-checklist" | "onboarding-checklist-collapse"

OnboardingChecklistItem

PropTypeDefaultDescription
children*React.ReactNodeValue for children.
donebooleanfalseMark the step complete: checked glyph + muted struck label.
iconReact.ReactNodeLeading icon (decorative).

Data attributes and CSS variables on OnboardingChecklistItem

AttributeValues
data-done""
data-slot"onboarding-checklist-item"

Accessibility

  • The segmented meter is a composed ProgressIndicator in segments mode — one named progressbar for the whole card, with its decorative segments hidden from assistive technology.
  • Collapse and expand controls expose complete action labels, and the collapsed pill preserves the current count in visible text.
  • The collapsed pill takes its accessible name from that visible text (WCAG 2.2 SC 2.5.3, Label in Name), so it carries no aria-label. Its parts are laid out by flex, which blockifies them, and accessible-name computation spaces any part whose computed display is not inline — so the pill announces as Getting started 2/6 Expand checklist with no separator markup of any kind.
  • Completed items are disabled and use a check plus struck label, so completion is never communicated by color alone.
KeyAction
TabMove through the collapse control and unfinished steps.
Enter / SpaceCollapse, expand, or activate the focused unfinished step.
ContractStates tested
Behaviourdefault, checked, collapsed, complete, disabled, expanded, success
Accessibilitydisabled, labeled, semantic-html
Visualdefault, hover, disabled, success

Do / Don't

Do
Keep done and total synchronized with the visible steps, and use concise verb-first step labels.
Don't
Mark a step complete from presentation state alone or leave a completed step keyboard-activatable.

On this page