← Home

API Reference

Full API docs are coming soon. In the meantime, the README covers all options and the compound component API.

Components

SuggestMenu

Root component. Accepts editor + trigger options, or a menu instance from useSuggestMenu.

SuggestMenu.Portal

Renders children into a portal outside the editor DOM.

SuggestMenu.Positioner

Positions the popup relative to the cursor using Base UI Popover.

SuggestMenu.Popup

The popup container. Receives data-empty when no items match.

SuggestMenu.List

The accessible listbox. Wires keyboard navigation via getListProps().

SuggestMenu.Group

Groups items with role="group" and aria-labelledby.

SuggestMenu.GroupLabel

Label element for a group.

SuggestMenu.Item

A single listbox option. Accepts item or index prop.

SuggestMenu.Empty

Rendered when the filtered item list is empty. Acts as a virtual option.

Hooks

useSuggestMenu(editor, options)

Returns a SuggestMenuInstance with state, items, groups, select, dismiss, and softDismiss. Pass the instance to SuggestMenu via the menu prop.

useListKeyboard(options)

Standalone keyboard navigation hook. Returns getListProps, getItemProps, handleKeyDown, and highlightedIndex.

SuggestMenu.useContext()

Access the SuggestMenuContext from any child component inside a SuggestMenu.

Extension

SuggestMenu.configure(options?)

Returns a configured Tiptap extension. Pass { pills: [...] } to register inline node schemas for pill/chip insertion.