co-menu-item
Row inside a co-menu. Two modes: 1. Leaf — when no nested co-menu-item / co-menu-divider are passed in the default slot, clicking emits coSelect and coMenuSelect (the latter bubbles up to co-menu for auto-close). 2. Submenu trigger — when nested menu items ARE present, the item renders a chevron suffix and on hover/focus opens a co-popover to the right containing those nested items. The trigger itself does NOT emit coSelect — only the leaf items inside do. Submenu nesting is unbounded — submenu items can themselves have submenus.
Ver código
<co-menu-item label="Ejemplo"></co-menu-item> Props
| Prop | Atributo | Tipo | Default | Descripción |
|---|---|---|---|---|
dense | dense | boolean | false | Tighter row metrics (32px instead of 36px). |
disabled | disabled | boolean | false | Visually disabled — pointer events ignored, opacity reduced. |
icon | icon | string | undefined | — | Icon name (Phosphor) rendered before the label. |
label | label | string | undefined | — | Text shown in the row. |
variant | variant | "danger" | "default" | 'default' | `danger` shifts text + icon to the destructive color. Use for Delete, etc. |
Eventos
| Evento | Detail | Bubbles | Cancelable | Descripción |
|---|---|---|---|---|
coMenuSelect | void | ✓ | ✓ | Bubbled to the parent `co-menu` so it can auto-close on leaf selection. Submenu triggers do not emit this. |
coSelect | void | ✓ | ✓ | Fired when this leaf item is selected. Submenu triggers do NOT fire it. |
Slots
Este componente no expone slots.
CSS Parts
Este componente no expone CSS parts.
CSS Custom Properties
Este componente no expone CSS custom properties.