View as Markdown

API reference: @salmonui/buttons/menu

MenuItemRenderPropstype

import type { MenuItemRenderProps } from '@salmonui/buttons/menu';
type MenuItemRenderProps = HTMLAttributes<HTMLElement> & {
    readonly ref: (element: HTMLElement | null) => void;
    readonly role: string;
    readonly tabIndex: number;
    readonly 'data-item-id'?: string;
    readonly href?: string;
    readonly target?: string;
};

Props passed to a custom item element (render): spread them all.

MenuItemRenderProps members (6, 6 inherited)
NameSignatureDescription
tabIndexinheritedtabIndex: number;
roleinheritedrole: string;
refinheritedref: (element: HTMLElement | null) => void;

Callback ref (assignable to any element's ref).

data-item-idoptionalinheriteddata-item-id?: string;
hrefoptionalinheritedhref?: string;
targetoptionalinheritedtarget?: string;