> ## Documentation Index
> Fetch the complete documentation index at: https://npm-packages.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Task lists

> Create checklists with nested tasks.

Package: [`@tiptap/react`](https://www.npmjs.com/package/@tiptap/react).

## Try it

Check off a task. Place the cursor at the end of a task and press Enter to add another. Press Tab on a task to nest it under the previous one; Shift+Tab brings it back out.

## Extensions

`TaskList` stores the list. `TaskItem` supplies each checkbox, its checked state, and keyboard behavior. Enable `nested` to allow tasks inside tasks.

```tsx task-list.tsx theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { EditorContent, useEditor } from "@tiptap/react";
import StarterKit from "@tiptap/starter-kit";
import { TaskItem, TaskList } from "@tiptap/extension-list";

export function TaskEditor() {
  const editor = useEditor({
    extensions: [
      StarterKit,
      TaskList,
      TaskItem.configure({ nested: true }),
    ],
    content: {
      type: "doc",
      content: [{
        type: "taskList",
        content: [{
          type: "taskItem",
          attrs: { checked: false },
          content: [{
            type: "paragraph",
            content: [{ type: "text", text: "Download the train tickets" }],
          }],
        }],
      }],
    },
    immediatelyRender: false,
  });

  return <EditorContent editor={editor} />;
}
```

## Keyboard

| Key | Action |
| - | - |
| `Enter` | Add a task |
| `Tab` | Nest under the previous task |
| `Shift Tab` | Move out one level |
| `[ ]` then Space on a new line | Start a task list |
| `⌘ Shift 9` / `Ctrl Shift 9` | Toggle a task list |

Checkboxes have accessible labels taken from their task text. Changes remain in this example until you refresh.

[Task list documentation](https://tiptap.dev/docs/editor/extensions/nodes/task-list) · [Task item documentation](https://tiptap.dev/docs/editor/extensions/nodes/task-item)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.