API reference: @salmonui/navigation/sidebar-menu
SidebarMenuIteminterface
import type { SidebarMenuItem } from '@salmonui/navigation/sidebar-menu';interface SidebarMenuItem {
readonly id: string;
readonly label: ReactNode;
readonly textValue?: string | undefined;
readonly icon?: ReactNode;
readonly href?: string | undefined;
readonly children?: readonly SidebarMenuItem[] | undefined;
readonly disabled?: boolean | undefined;
readonly badge?: ReactNode;
readonly type?: 'item' | undefined;
}
A link, an action or a submenu.
| Name | Signature | Description |
|---|---|---|
id | readonly id: string; | Stable, unique id (the selection and expansion key). |
label | readonly label: ReactNode; | |
textValueoptional | readonly textValue?: string | undefined; | Plain text of |
iconoptional | readonly icon?: ReactNode; | Decorative icon ( |
hrefoptional | readonly href?: string | undefined; | Renders a link (through |
childrenoptional | readonly children?: readonly SidebarMenuItem[] | undefined; | Nested items: the item becomes a disclosure button for a submenu. |
disabledoptional | readonly disabled?: boolean | undefined; | |
badgeoptional | readonly badge?: ReactNode; | Trailing content (a count, a status dot); part of the accessible name. |
typeoptional | readonly type?: 'item' | undefined; |