CommandPaletteShell

See source code
Table of contents

The command palette's input, list and keyboard handling. Render it from a custom CommandPalette slot, passing the slot's onClose, to build a palette that looks or sits differently. It also works without an editor, inside TldrawUiContextProvider, where the app opens and closes it.


Properties

children

The palette's items, as TldrawUiMenu* components and, with an editor, CommandPalette* groups.

children: ReactNode;

onClose

Called when the user dismisses the palette or runs a command.


position

optional

Where the palette opens. Defaults to 'bottom', which sits just above the horizontal toolbar at its width (at least 320px), and otherwise opens lower than 'center'. 'top' sits near the top edge. On touch devices every position opens near the top edge.


suggestions

optional

What shows above the list while the query is empty. 'recent', the default, lists recently run commands; 'none' shows nothing. Recents still rank search results either way.


Prev
CommandPaletteSelectionGroup
Next
CommandPaletteStylesGroup