Skip to content
Sign upPro
Apps SDKChecklist widgetMenu

Checklist widget (Pro)

ProIncluded in $99

Steps an assistant laid out, to tick off in the chat, with a progress bar of one segment per step and drag to reorder.

ProSteps for a trip. Tick them off, drag one by its handle, or add your own.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/checklist-widget

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { ChecklistWidget } from "@/components/ui/chatcn/pro/checklist-widget"

<ChecklistWidget
  title="Before you fly"
  meta={["Tokyo", "Friday"]}
  defaultItems={[
    { id: "passport", label: "Check your passport", done: true },
    { id: "esim", label: "Buy an eSIM", detail: "Install it before you fly" },
  ]}
  onItemsChange={save}
  addable
/>

The bar under the title has a segment per step in step order, so progress reads as which steps, not only how many. Ticking a step draws its check left to right and fills its segment; when the last one is ticked the bar, the boxes and the count turn green. Drag a step by its handle, which shows on hover and always on touch, and the steps it passes slide aside; or focus the handle and use the arrow keys, or press Alt with the arrow keys on a step. Moves are announced. reorderable={false} keeps a fixed order for steps that must run in sequence. addable adds a field at the end.

Examples

States

ProEverything done, and a fixed order with nothing ticked.

Props

PropTypeNotes
items, defaultItems, onItemsChangeChecklistItem[]{ id, label, detail?, done? }
title, metaThe header; the count sits beside it
reorderablebooleanDefault true
addablebooleanA field to add steps
labelsPartial<ChecklistWidgetLabels>Every string, for translation

Keyboard

KeyAction
SpaceTick or untick a step
Arrow up, down on a handleMove the step
Alt and arrow up, down on a stepMove the step
Enter in the fieldAdd the step

Accessibility

  • Steps are real checkboxes inside labels.
  • Handles are buttons named for their step; every move is announced in a polite live region.

Motion

Checks draw in with clip-path over 300 ms and segments fill with scale. Passed steps slide with translate. Under reduced motion they change in place.