Skip to content

Vizel API / react/src / VizelSlashMenuProps

Interface: VizelSlashMenuProps ​

Defined in: packages/react/src/components/VizelSlashMenu.tsx:26

Properties ​

className? ​

ts
optional className?: string;

Defined in: packages/react/src/components/VizelSlashMenu.tsx:40

Custom class name for the menu container


commands ​

ts
commands: readonly VizelCommand[];

Defined in: packages/react/src/components/VizelSlashMenu.tsx:30

Commands surfaced in the menu (filtered by query internally).


editor ​

ts
editor: Editor;

Defined in: packages/react/src/components/VizelSlashMenu.tsx:32

Editor the commands evaluate canRun / isActive against.


groupOrder? ​

ts
optional groupOrder?: string[];

Defined in: packages/react/src/components/VizelSlashMenu.tsx:52

Custom group order


locale ​

ts
locale: VizelLocale;

Defined in: packages/react/src/components/VizelSlashMenu.tsx:34

Locale supplying command label / description strings.


onSelect ​

ts
onSelect: (id) => void;

Defined in: packages/react/src/components/VizelSlashMenu.tsx:38

Select a command by its VizelCommandSpec.id.

Parameters ​

ParameterType
idstring

Returns ​

void


query ​

ts
query: string;

Defined in: packages/react/src/components/VizelSlashMenu.tsx:36

Current query string.


ref? ​

ts
optional ref?: Ref<VizelSlashMenuRef>;

Defined in: packages/react/src/components/VizelSlashMenu.tsx:28

Ref to access menu methods


renderEmpty? ​

ts
optional renderEmpty?: () => ReactNode;

Defined in: packages/react/src/components/VizelSlashMenu.tsx:50

Custom empty state component

Returns ​

ReactNode


renderItem? ​

ts
optional renderItem?: (props) => ReactNode;

Defined in: packages/react/src/components/VizelSlashMenu.tsx:44

Custom render function for items

Parameters ​

ParameterType
props{ isSelected: boolean; item: VizelCommandSpec; onClick: () => void; }
props.isSelectedboolean
props.itemVizelCommandSpec
props.onClick() => void

Returns ​

ReactNode


showGroups? ​

ts
optional showGroups?: boolean;

Defined in: packages/react/src/components/VizelSlashMenu.tsx:42

Whether to show items grouped by category (default: true when not searching)

Released under the MIT License.