CommandPalette
Render an inline Astryx command palette for notebook output areas.
Astryx Props
JSON-safe CommandPalette props forwarded to Astryx.
Supported Astryx props include:
isOpen(boolean; required): Whether the command palette dialog is visible.onOpenChange((isOpen: boolean) => void; required): Called when the palette visibility changes.searchSource(SearchSource<T>; required): Search source providing items via search(query) and bootstrap(). Use createStaticSource for static lists.input(ReactNode): Input slot. Defaults to CommandPaletteInput with standard behavior.footer(ReactNode): Footer slot. Defaults to CommandPaletteFooter showing keyboard hints.renderItem((item: T, isSelected: boolean) => ReactNode): Per-item render function. Auto-grouping by auxiliaryData.group is preserved. When omitted, renders label text.emptySearchText(ReactNode): Content shown when a search query returns no results.emptyBootstrapText(ReactNode): Content shown when there is no search query and bootstrap() returns nothing.value(string): Controlled selected value for picker mode.onValueChange((value: string) => void): Called when the selected value changes in picker mode.label(string): Accessible label for the command palette dialog.width(number or string): Width of the dialog.maxHeight(number or string): Maximum height of the dialog.isInline(boolean): Renders command palette content inline without modal behavior. Automatically disables input auto-focus and initial highlighted-item auto-scroll. For documentation previews and showcases only.
Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.
See Astryx component docs: https://astryx.atmeta.com/components/CommandPalette.
Notes
The palette renders inline and open by default so it remains contained in a Jupyter output area instead of creating a page-level modal overlay.
Functions
constructor__init__(items, value=None, *, label='Command palette', search=None, open=True, inline=True, width=None, max_height=None, empty_search_text=None, empty_bootstrap_text=None, **props) -> NoneparamitemsIterable[Any] | Mapping[str, Any]Command records. Mappings, pairs, strings, and dictionaries are
normalized into {"id": ..., "label": ...} records.
paramvaluestr | None= NoneSelected command id synchronized back to Python.
paramlabelstr= 'Command palette'Accessible dialog label.
paramsearchCallable[[str], Iterable[Any]] | None= NoneOptional Python search callback. When provided, Astryx search queries
are sent to Python and callback results are normalized into
{"id": ..., "label": ...} command records. When omitted, the
frontend builds a static search source from items.
paramopenbool= TrueControlled palette visibility.
paraminlinebool= TrueWhether to render inside the notebook output instead of as a modal.
paramwidthint | float | str | None= NonePalette width.
parammax_heightint | float | str | None= NoneMaximum palette height.
paramempty_search_textstr | None= NoneMessage shown when a query has no results.
paramempty_bootstrap_textstr | None= NoneMessage shown when the initial item source is empty.
parampropsAny= {}Returns
None