---
title: "TaskList extension"
description: "Use the Task List extension in Tiptap to add support for task lists rendered as . More in our docs!"
---

> This page is for Tiptap 2.x. [See the latest version of this page.](https://tiptap.dev/docs/editor/extensions/nodes/task-list.md)

# 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 <code>[ ] </code> or <code>[x] </code> at the beginning of a new line and it will magically transform to a task list.

> **Interactive demo:** [TaskList](https://v2--tiptap-embed.netlify.app/preview/Nodes/TaskList)

## Install

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

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

## 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() | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>9</kbd> | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>9</kbd> |

## Source code

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