View as Markdown

API reference: @salmonui/buttons/menu

SubmenuPropsinterface

import type { SubmenuProps } from '@salmonui/buttons/menu';
interface SubmenuProps extends Omit<ItemCommonProps, 'children' | 'onClick'> {
    readonly id?: string;
    readonly label: ReactNode;
    readonly children?: ReactNode;
    readonly menuClassName?: string;
    readonly menuStyle?: CSSProperties;
}
SubmenuProps members (11, 6 inherited)
NameSignatureDescription
idoptionalreadonly id?: string;

DOM id of the submenu item (default generated; the submenu is labelled by it).

labelreadonly label: ReactNode;

Content of the item that opens the submenu.

childrenoptionalreadonly children?: ReactNode;

The submenu entries.

menuClassNameoptionalreadonly menuClassName?: string;

Class name and style of the submenu popup.

menuStyleoptionalreadonly menuStyle?: CSSProperties;
iconoptionalinheritedicon?: ReactNode;

Decorative leading icon (aria-hidden).

disabledoptionalinheriteddisabled?: boolean;

Skipped by arrow keys and typeahead; aria-disabled="true".

textValueoptionalinheritedtextValue?: string;

Typeahead text when the children are not plain text.

classNameoptionalinheritedclassName?: string;
styleoptionalinheritedstyle?: CSSProperties;
refoptionalinheritedref?: Ref<HTMLElement>;