---
title: "TaskList extension"
description: "Use the Task List extension in Tiptap to add support for task lists rendered as . More in our docs!"
canonical_url: "https://tiptap.dev/docs/editor/extensions/nodes/task-list"
---

# TaskList extension

Use the Task List extension in Tiptap to add support for task lists rendered as . More in our docs!

This extension enables you to use task lists in the editor. They are rendered as `<ul data-type="taskList">`. This implementation doesn’t require any framework, it’s using Vanilla JavaScript only.

Type \[ ]  or \[x]  at the beginning of a new line and it will magically transform to a task list.

> **Interactive demo:** [TaskList](https://embed.tiptap.dev/preview/Nodes/TaskList)

## Install

```bash
npm install @tiptap/extension-list
```

This extension requires the [`TaskItem`](https://tiptap.dev/docs/editor/extensions/nodes/task-item.md) extension.

## Usage

```js
import { Editor } from '@tiptap/core'
import { TaskList } from '@tiptap/extension-list'

new Editor({
  extensions: [TaskList],
})
```

This extension is installed by default with the `ListKit` extension, so you don’t need to install it separately.

```ts
import { Editor } from '@tiptap/core'
import { ListKit } from '@tiptap/extension-list'

new Editor({
  extensions: [ListKit],
})
```

## Settings

### HTMLAttributes

Custom HTML attributes that should be added to the rendered HTML tag.

```js
TaskList.configure({
  HTMLAttributes: {
    class: 'my-custom-class',
  },
})
```

### itemTypeName

Specify the list item name.

Default: `'taskItem'`

```js
TaskList.configure({
  itemTypeName: 'taskItem',
})
```

## Commands

# toggleTaskList()

Toggle a task list.

```js
editor.commands.toggleTaskList()
```

## Keyboard shortcuts

| Command          | Windows/Linux       | macOS           |
| ---------------- | ------------------- | --------------- |
| toggleTaskList() | Control + Shift + 9 | Cmd + Shift + 9 |

## Source code

[packages/extension-list/src/task-list/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-list/src/task-list/)

## Minimal Install

```js
import { Editor } from '@tiptap/core'
import { TaskList } from '@tiptap/extension-list/task-list'

new Editor({
  extensions: [TaskList],
})
```
