Vizel API / react/src / VizelSlashMenuProps
Interface: VizelSlashMenuProps
Defined in: packages/react/src/components/VizelSlashMenu.tsx:25
Properties
className?
optional className?: string;Defined in: packages/react/src/components/VizelSlashMenu.tsx:39
Custom class name for the menu container
commands
commands: readonly VizelCommand[];Defined in: packages/react/src/components/VizelSlashMenu.tsx:29
Commands surfaced in the menu (filtered by query internally).
editor
editor: Editor;Defined in: packages/react/src/components/VizelSlashMenu.tsx:31
Editor the commands evaluate canRun / isActive against.
groupOrder?
optional groupOrder?: string[];Defined in: packages/react/src/components/VizelSlashMenu.tsx:51
Custom group order
locale
locale: VizelLocale;Defined in: packages/react/src/components/VizelSlashMenu.tsx:33
Locale supplying command label / description strings.
onSelect
onSelect: (id) => void;Defined in: packages/react/src/components/VizelSlashMenu.tsx:37
Select a command by its VizelCommandSpec.id.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
void
query
query: string;Defined in: packages/react/src/components/VizelSlashMenu.tsx:35
Current query string.
ref?
optional ref?: Ref<VizelSlashMenuRef>;Defined in: packages/react/src/components/VizelSlashMenu.tsx:27
Ref to access menu methods
renderEmpty?
optional renderEmpty?: () => ReactNode;Defined in: packages/react/src/components/VizelSlashMenu.tsx:49
Custom empty state component
Returns
ReactNode
renderItem?
optional renderItem?: (props) => ReactNode;Defined in: packages/react/src/components/VizelSlashMenu.tsx:43
Custom render function for items
Parameters
| Parameter | Type |
|---|---|
props | { isSelected: boolean; item: VizelCommandSpec; onClick: () => void; } |
props.isSelected | boolean |
props.item | VizelCommandSpec |
props.onClick | () => void |
Returns
ReactNode
showGroups?
optional showGroups?: boolean;Defined in: packages/react/src/components/VizelSlashMenu.tsx:41
Whether to show items grouped by category (default: true when not searching)