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

# BulletList

> Create unordered bullet lists with nested support.

The BulletList extension allows you to create unordered bullet lists. It requires the ListItem extension to function properly.

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @tiptap/extension-bullet-list @tiptap/extension-list-item
  ```

  ```bash yarn theme={null}
  yarn add @tiptap/extension-bullet-list @tiptap/extension-list-item
  ```

  ```bash pnpm theme={null}
  pnpm add @tiptap/extension-bullet-list @tiptap/extension-list-item
  ```
</CodeGroup>

## Usage

The BulletList extension is included in the StarterKit by default:

```typescript theme={null}
import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'

const editor = new Editor({
  extensions: [StarterKit],
})
```

To use it standalone:

```typescript theme={null}
import { Editor } from '@tiptap/core'
import Document from '@tiptap/extension-document'
import BulletList from '@tiptap/extension-bullet-list'
import ListItem from '@tiptap/extension-list-item'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'

const editor = new Editor({
  extensions: [
    Document,
    Paragraph,
    Text,
    BulletList,
    ListItem,
  ],
})
```

## Configuration

### itemTypeName

The node name for list items.

<ParamField path="itemTypeName" type="string" default="'listItem'">
  Specifies which node type to use for list items.

  ```typescript theme={null}
  BulletList.configure({
    itemTypeName: 'listItem',
  })
  ```
</ParamField>

### HTMLAttributes

Custom HTML attributes to add to the bullet list element.

<ParamField path="HTMLAttributes" type="Record<string, any>" default="{}">
  Custom HTML attributes that should be added to the rendered HTML tag.

  ```typescript theme={null}
  BulletList.configure({
    HTMLAttributes: {
      class: 'my-bullet-list',
    },
  })
  ```
</ParamField>

### keepMarks

Keep marks when splitting the list.

<ParamField path="keepMarks" type="boolean" default="false">
  Whether to preserve text marks when creating new list items.

  ```typescript theme={null}
  BulletList.configure({
    keepMarks: true,
  })
  ```
</ParamField>

### keepAttributes

Keep attributes when splitting the list.

<ParamField path="keepAttributes" type="boolean" default="false">
  Whether to preserve attributes when creating new list items.

  ```typescript theme={null}
  BulletList.configure({
    keepAttributes: true,
  })
  ```
</ParamField>

## Commands

### toggleBulletList

Toggles a bullet list. If the current node is already a bullet list, it converts it to paragraphs.

```typescript theme={null}
editor.commands.toggleBulletList()
```

## Keyboard Shortcuts

* **Mod-Shift-8**: Toggle bullet list

## Input Rules

The BulletList extension supports Markdown-style input rules:

* Type `-` followed by a space to create a bullet list
* Type `*` followed by a space to create a bullet list
* Type `+` followed by a space to create a bullet list

## Related Extensions

* [ListItem](/extensions/nodes/list-item) - Required for bullet lists
* [OrderedList](/extensions/nodes/ordered-list) - For numbered lists

## Source Code

View the source code on GitHub:

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