---
title: "Add a dropdown menu for list types"
description: "Add a dropdown menu that helps selecting different list types in your Tiptap editor. More in the docs."
---

> This page is for Tiptap 2.x. [See the latest version of this page.](https://tiptap.dev/docs/ui-components/components/list-dropdown-menu.md)

# Add a dropdown menu for list types

Add a dropdown menu that helps selecting different list types in your Tiptap editor. More in the docs.

> **Upgrade to v3**
>
> To use UI components or templates you need to upgrade to Editor version 3.x. See the [upgrade
> guide](https://tiptap.dev/docs/resources/whats-new) for more details.

A dropdown menu for selecting from multiple list types.

> **Interactive demo:** [list dropdown menu](https://template.tiptap.dev/preview/tiptap-ui/list-dropdown-menu)

## Install

You can add the component via Tiptap CLI (for Vite or Next.js)

```bash
npx @tiptap/cli add list-dropdown-menu
```

### Manual Integration

For frameworks other than Vite or Next.js, add the component manually from the [open-source repository](https://github.com/ueberdosis/tiptap-ui-components/tree/main/apps/web/src/components/tiptap-ui/list-dropdown-menu).

### Import styles

This component requires you to import our styles which were added to `styles/keyframe-animation.scss` and `styles/_variables.scss`.

## Usage

```tsx
import { EditorContent, EditorContext, useEditor } from '@tiptap/react'
import { StarterKit } from '@tiptap/starter-kit'
import { TaskList } from '@tiptap/extension-task-list'
import { TaskItem } from '@tiptap/extension-task-item'
import { ListDropdownMenu } from '@/components/tiptap-ui/list-dropdown-menu'

import '@/components/tiptap-node/code-block-node/code-block-node.scss'
import '@/components/tiptap-node/list-node/list-node.scss'
import '@/components/tiptap-node/paragraph-node/paragraph-node.scss'

export default function MyEditor() {
  const editor = useEditor({
    immediatelyRender: false,
    extensions: [StarterKit, TaskList, TaskItem.configure({ nested: true })],
    content: `
        <ul>
            <li>
                <strong>Bold</strong> for emphasis with <code>**</code> or <code>⌘+B</code> or the <code>B</code> button.
            </li>
            <li>
                <em>Italic</em> for subtle nuances with <code>*</code> or <code>⌘+I</code> or the <code>I</code> button.
            </li>
            <li>
                <s>Strikethrough</s> to show revisions with <code>~~</code> or the <code>~~S~~</code> button.
            </li>
        </ul>
        <ul data-type="taskList">
            <li data-type="taskItem" data-checked="true">
                <div>
                    Test template
                </div>
            </li>
            <li data-type="taskItem" data-checked="false">
                <div>
                    <a target="_blank" rel="noopener noreferrer nofollow" href="https://tiptap.dev/pricing">Create account</a>
                </div>
            </li>
            <li data-type="taskItem" data-checked="false">
                <div>
                   Download free template
                </div>
            </li>
        </ul>
        `,
  })

  return (
    <EditorContext.Provider value={{ editor }}>
      <div className="tiptap-button-group" data-orientation="horizontal">
        <ListDropdownMenu types={['bulletList', 'orderedList', 'taskList']} />
      </div>

      <EditorContent editor={editor} role="presentation" />
    </EditorContext.Provider>
  )
}
```

## Props

| Name                | Type                                                 | Default                                   | Description                               |
| ------------------- | ---------------------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| editor              | Editor \| null                                       | null                                      | The Tiptap editor instance                |
| types               | `Array<'bulletList' \| 'orderedList' \| 'taskList'>` | ['bulletList', 'orderedList', 'taskList'] | The list types to include in the dropdown |
| hideWhenUnavailable | boolean                                              | false                                     | Whether the menu is in a floating context |
| onOpenChange        | (isOpen: boolean) => void                            | -                                         | Callback when dropdown open state changes |

## Requirements

Used reference components

- `use-tiptap-editor` (hook)
- `tiptap-utils` (lib)
- `list-button` (ui)
- `button` (primitive)
- `dropdown-menu` (primitive)
- `list-icon` (icon)
- `chevron-down-icon` (icon)

Open source feature(s)

- `@tiptap/extension-task-list`
- `@tiptap/extension-task-item`
