View as Markdown

API reference: @salmonui/buttons/menu

MenuRadioItemPropsinterface

import type { MenuRadioItemProps } from '@salmonui/buttons/menu';
interface MenuRadioItemProps extends ItemCommonProps {
    readonly value: string;
    readonly id?: string;
    readonly onAction?: (event: MenuActionEvent) => void;
}
MenuRadioItemProps members (11, 8 inherited)
NameSignatureDescription
valuereadonly value: string;
idoptionalreadonly id?: string;

Item key reported in onAction (default: value).

onActionoptionalreadonly onAction?: (event: MenuActionEvent) => void;

Runs after the selection; event.preventDefault() keeps the menu open. Space always keeps it open.

childrenoptionalinheritedchildren?: ReactNode;
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>;
onClickoptionalinheritedonClick?: ((event: MouseEvent<HTMLElement, MouseEvent>) => void);