[ Forms ]

Checklist

An onboarding-style checklist: round checks joined by a connector that fills in as steps are done. Clicking a step toggles it, and the next unfinished step is highlighted automatically.

2 examplesDark modeAccessible

Import#

import { Checklist } from 'reusify-ui';

When to use#

  • Getting-started and setup guides where users tick off steps in any order.
  • Short to-do lists inside cards and popovers.
  • For read-only progress (running, failed…), use StepList; for a single yes/no, Checkbox.

Examples#

Onboarding#

sequential makes steps finish in order: only the next step can be completed, and only the latest finished one can be undone, so a step in the middle can never be unchecked. Later steps are dimmed until their turn.

Done: ["extension"]

const steps = [
  { key: 'extension', title: 'Connect extension', description: 'Add MemoryBase to Chrome' },
  { key: 'login', title: 'Log in to your AI tools', description: 'Bring in your past conversations' },
  { key: 'memory', title: 'Try your first memory', description: 'Open ChatGPT or Claude to try it' },
];
const [done, setDone] = useState(['extension']);

<Checklist items={steps} value={done} onChange={setDone} color="#ec4899" sequential />

Uncontrolled, custom active, disabled steps#

defaultValue for uncontrolled use. active picks the highlighted step yourself (null for none). Disabled steps cannot be toggled.

<Checklist
  defaultValue={['account']}
  active="team"
  items={[
    { key: 'account', title: 'Create account' },
    { key: 'team', title: 'Invite your team' },
    { key: 'billing', title: 'Add billing', description: 'Available after the trial', disabled: true },
  ]}
/>

Used in designs#

Checklist in real layouts: this design uses it. Open one to try it and copy the code.

API reference#

<Checklist />

Renders an <ol>; other props go on it.

items*-
{ key, title, description?, disabled? }[]

The steps.

value-
string[]

Keys of completed steps (controlled).

defaultValue[]
string[]

Initially completed keys (uncontrolled).

onChange-
(keys: string[]) => void

Called with the new list of completed keys.

active-
string | null

Highlighted step. Defaults to the first unfinished one.

sequentialfalse
boolean

Steps complete in order; only the next step can be checked and only the latest done one unchecked.

color'primary'
'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | CSS color

Color of checks, titles and the filled connector.

connectortrue
boolean

Line between the checks.

Accessibility#

  • Each step is a button with role="checkbox" and aria-checked, so it is announced as a checkbox with its title and description.
  • The highlighted step has aria-current="step".
  • With sequential, steps that can't be toggled right now have aria-disabled but stay focusable, so their state can still be read.
  • Keyboard: Tab moves between steps, Space or Enter toggles.