<Menu />

ui/menu.svelte

"A menu is not a list, it's just like a list but more and less"
S. Kim, 1654

Component Menu examples :
Using slots
component Popper demo using slots
A menu
A menu with icons
A menu with some dividers
density density-preset
bordered boolean
code

<Menu>
	<MenuItem divider={true}>menu item</MenuItem>
	<MenuItem icon="home" selected={true}>menu item</MenuItem>
	<MenuItem icon="close">menu item</MenuItem>
	<MenuItem divider={true}>menu item</MenuItem>
	<MenuItem>menu item</MenuItem>
</Menu>
Api preview :
__propDef: {
    props: {
        class?: string | undefined;
        element?: HTMLElement | null | undefined;
        /** @deprecated */ menuList?: IMenuItemProps[] | undefined;
        menuItemsList?: IMenuItemProps[] | undefined;
        data?: Record<string, any>[] | undefined;
        density?: "medium" | "default" | "none" | "tight" | "kind" | undefined;
        style?: string | undefined;
        /** menu can have no border */ bordered?: boolean | undefined;
        selectedIndex?: number | undefined;
        actions?: {
            navigate: (idx: number) => void;
        } | undefined;
    };
    events: {
        [evt: string]: CustomEvent<any>;
    };
    slots: {
        default: {};
    };
};




<MenuItem />

undefined/undefined.svelte

""

Api preview :
__propDef: {
    props: {
        class?: string | undefined;
        element?: HTMLElement | undefined;
        text?: string | undefined;
        /** text props, shown on the right side of the menuItem*/ action?: string | undefined;
        icon?: IMenuItemProps["icon"] | undefined;
        iconColor?: string | undefined;
        iconSize?: ElementProps["sizeType"] | undefined;
        divider?: IMenuItemProps["divider"];
        dividerBefore?: IMenuItemProps["divider"];
        data?: Record<string, any> | undefined;
        /** highlight menu item when selected*/ selected?: boolean | undefined;
        onMenuItemClick?: Function | undefined;
        /** position in the list */ itemIndex?: number | undefined;
    };
    events: {
        [evt: string]: CustomEvent<any>;
    };
    slots: {
        divider: {};
        menuItemStart: {};
        iconSlot: {};
        default: {};
        menuItemText: {};
        menuItemEnd: {};
        actionSlot: {};
        menuItemDivider: {};
    };
};