# blocks/todo

> To-do — `checked` prop. The checkbox sits outside the editable region, so toggling it never moves the caret.

To-do (F-21) — `checked` prop. The checkbox sits outside the editable region, so toggling it never moves the caret. `[] ` / `[x] ` input rules, ⌘⏎ toggles. Markdown: `- [ ]` / `- [x]`.

```js
import todo from 'verbal-editor/blocks/todo';
```

| JS gzip | CSS gzip |
| --- | --- |
| 0.79 KB | 0.55 KB |

See it live on [Lists & tasks](#/examples/lists) — every example page on the landing is editable.

## Contract

|  |  |
| --- | --- |
| Block type | `todo` |
| Content | text with marks |
| Props | `checked: boolean` |
| Slash menu | `▢ To-do` |
| Keywords | `todo` `task` `checkbox` |
| Keys | `⌘⏎` |
| Typing rules | `^\[([ xX]?)\]\s$` |
| Pastes from | `<li>` `Markdown` |
| Copies as | `Markdown` `HTML` |

## Acceptance

| Feature | Acceptance | Budget |
| --- | --- | --- |
| F-21 · To-do | Toggling checkbox never moves the caret | ≤ 0.8KB |
