Skip to main content
Version: Next

CommandPalette API

import { CommandPalette } from '@editora/ui-react';

Props​

PropTypeDescription
emptyTextstring
headlessboolean
onClose() => void
onOpen() => void
onOpenChange(detail: CommandPaletteOpenChangeDetail) => void
onQueryChange(detail: CommandPaletteQueryChangeDetail) => void
onSelect(detail: CommandPaletteSelectDetail) => void
openboolean
placeholderstring
querystring

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

CommandPalette.Item props​

PropTypeDescription
keywordsstring
labelstring
valuestring

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-command-palette>​

CommandPalette renders the ui-command-palette custom element from @editora/ui-core, which can also be used without React.

Attributes: empty-text, headless, open, placeholder, query