Skip to content
synccn

Onboarding Checklist

New

Getting-started steps with a progress ring, one open step and its action, optional steps, collapse and a finished state.

1/4

Get started

Finish setup to deploy your first app

  1. We'll build every push and give each pull request a preview link.

Installation

$ pnpm dlx shadcn@latest add @synccn/onboarding-checklist

First time in this project? Connect synccn with one command.

Usage

import { OnboardingChecklist } from "@/components/ui/onboarding-checklist";<OnboardingChecklist steps={steps} value={done} onValueChange={setDone} />

API reference

Generated from the component's TypeScript types, so it always matches the code.

OnboardingChecklist

Getting-started checklist: progress ring, one open step at a time with its action, mark done or skip, collapse, and a finished state. The next unfinished step opens by itself.

  • stepsrequired
    ChecklistStep[]

    —

  • value
    string[]

    Controlled list of finished step ids.

  • defaultValue
    string[]

    Default []

    Finished step ids at first, when uncontrolled.

  • onValueChange
    (done: string[]) => void

    Called with the finished step ids.

  • title
    React.ReactNode

    Default "Get started"

    Heading.

  • description
    React.ReactNode

    Line under the heading.

  • onDismiss
    () => void

    Shows a close button. Called when the person dismisses the checklist.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

  • lib/hooksuseControllable (works controlled or uncontrolled)
  • lib/utilscn (merges class names)

npm packages

Keyboard

  • EnterorSpaceOpen a step, or mark it done

Accessibility

  • Steps are an ordered list; each tick is a toggle button that says which step it marks.
  • Step headers use aria-expanded and aria-controls.

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA attributes: aria-controls, aria-expanded, aria-label, aria-labelledby, aria-pressed