Content blocks

To-do

The to-do list item: a 16px checkbox; checked items are struck through and faded.

Write the outline
Share it for review

Usage

  • Use To-do for actionable items that people check off (checklists, meeting actions).
  • Pass onCheckedChange to make the checkbox interactive; omit it for a read-only checklist.
  • Don’t use To-do for options in a form; use Checkbox instead.
  • Don’t use To-do for tracked work with owners and dates; use a database instead.

Installation

Install the package (React 19):

terminal
npm install @krackedui/motion

Import the styles once, in your app entry or root layout:

/src/main.tsx
import '@krackedui/motion/styles.css';

Use it anywhere inside your app's <Theme> (see Installation):

/src/TodoExample.tsx
import { useState } from 'react';
import { BlockContent, ToDo, rt } from '@krackedui/motion';

export function TodoDemo() {
  const [a, setA] = useState(true);
  const [b, setB] = useState(false);
  return (
    <BlockContent>
      <ToDo text={rt('Write the outline')} checked={a} onCheckedChange={setA} spacing={{ bottom: false }} />
      <ToDo text={rt('Share it for review')} checked={b} onCheckedChange={setB} spacing={{ top: false }} />
    </BlockContent>
  );
}

Examples

Read-only

Without onCheckedChange the checkbox is read-only.

Done
Not done

With children

Prepare release
Changelog
Announcement

API Reference

ToDo

Based on <div> and supports its props. Adds:

PropTypeDefault
text
RichText
renderLeaf
LeafRenderer
checked
boolean
false
onCheckedChange
(checked: boolean) => void
depth
number
0
spacing
{ top?: boolean; bottom?: boolean; nested?: boolean }
color
BlockColor
"default"
children
ReactNode

Accessibility

  • The box is the Checkbox atom (role="checkbox", aria-checked, label “To-do”); Space toggles it when focused.
  • Pass a more specific aria-label through a custom marker if several to-dos need distinct names.
© 2026 Motion. Internal documentation.