Menu
Terminal-style vertical menu with items, dividers, disabled and custom slot.
Menu
Design lines
>+New File
↗Open File...
⌘SSave
⇧⌘SSave As...
⌘,Preferences
⌘QQuit
vue
1<Tabs defaultValue="tuix">2 <TabsList>3 <Tab value="tuix">TUIX</Tab>4 <Tab value="rubik">Rubik</Tab>5 </TabsList>6 <TabPanel value="tuix">7 <Menu :items="items" :active-index="0" design="tuix" />8 </TabPanel>9 <TabPanel value="rubik">10 <Menu :items="items" :active-index="0" design="rubik" />11 </TabPanel>12</Tabs>Demo
Items (items)
Array de objetos con label, icon, disabled, divider.
vue
1<Menu :items="[2 { label: 'New File', icon: '+' },3 { label: 'Open File...', icon: '↗' },4 { label: 'Save', disabled: true },5 { label: '', divider: true },6 { label: 'Preferences' },7]" :active-index="0" />Active index (activeIndex)
Resalta un item con el marcador >.
vue
1<Menu :items="[{ label: 'One' }, { label: 'Two' }, { label: 'Three' }]" :activeIndex="0" />2<Menu :items="[{ label: 'One' }, { label: 'Two' }, { label: 'Three' }]" :activeIndex="1" />3<Menu :items="[{ label: 'One' }, { label: 'Two' }, { label: 'Three' }]" :activeIndex="2" />Color (color)
Color del item activo.
vue
1<Menu :items="[{ label: 'Primary' }, { label: 'Item 2' }]" color="primary" :activeIndex="0" />2<Menu :items="[{ label: 'Success' }, { label: 'Item 2' }]" color="success" :activeIndex="0" />3<Menu :items="[{ label: 'Danger' }, { label: 'Item 2' }]" color="danger" :activeIndex="0" />Divider and disabled
Separadores visuales e items no interactivos.
vue
1<Menu2 :items="[3 { label: 'New File' },4 { label: 'Open File', icon: '>' },5 { label: 'Save', disabled: true },6 { label: '', divider: true },7 { label: 'Preferences' },8 { label: '', divider: true },9 { label: 'Quit' },10 ]"11 :activeIndex="0"12/>API
| Prop | Type | Default | Description |
|---|---|---|---|
items | Array<{label, icon?, disabled?, divider?}> | [] | Menu items |
color | 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark' | 'primary' | Active item color |
activeIndex | number | -1 | Highlighted item index |
design | 'tuix' | 'rubik' | — (inherits from data-design) | Design line (or inherit from data-design). |
items — each item has this shape:
| Field | Type | Required | Description |
|---|---|---|---|
label | string | ✅ | Item text |
icon | string | ❌ | Optional icon or emoji |
disabled | boolean | ❌ | Disabled item |
divider | boolean | ❌ | Separator line |
Events
| Event | Payload | Description |
|---|---|---|
select | index: number | Emitted when clicking an item |
Slots
| Slot | Props | Description |
|---|---|---|
default | — | Alternative to items |
item | { item, index, active } | Custom per-item rendering |
CSS Custom Properties
| Token | Default | Description |
|---|---|---|
--font-mono | "JetBrains Mono", ui-monospace, monospace | Monospace font stack for code-like content (key labels, log lines, chips). |
--accent | from theme (--ctp-latte-mauve / --ctp-mocha-mauve) | Accent color, mapped from the active semantic color. |
--bg | from theme (--ctp-latte-base / --ctp-mocha-base) | Base background of the surface. |
--bg-alt | from theme (--ctp-latte-mantle / --ctp-mocha-mantle) | Alternate background (the next layer down from the base). |
--bg-panel | from theme (--ctp-latte-surface1 / --ctp-mocha-surface1) | Background of panel-like raised surfaces (cards, accordions). |
--border | from theme (--ctp-latte-surface0 / --ctp-mocha-surface0) | Outline and divider color for surfaces. |
--text | from theme (--ctp-latte-text / --ctp-mocha-text) | Primary text color used inside the component. |
--color-primary | from theme (--ctp-latte-mauve / --ctp-mocha-mauve) | Primary semantic color (mauve in Catppuccin). |
--color-secondary | from theme (--ctp-latte-lavender / --ctp-mocha-lavender) | Secondary semantic color (lavender in Catppuccin). |
--color-tertiary | from theme (--ctp-latte-blue / --ctp-mocha-blue) | Tertiary semantic color (blue in Catppuccin). |
--color-success | from theme (--ctp-latte-green / --ctp-mocha-green) | Success semantic color (green in Catppuccin). |
--color-warning | from theme (--ctp-latte-yellow / --ctp-mocha-yellow) | Warning semantic color (yellow in Catppuccin). |
--color-danger | from theme (--ctp-latte-red / --ctp-mocha-red) | Danger semantic color (red in Catppuccin). |
--color-light | from theme (--ctp-latte-surface1 / --ctp-mocha-rosewater) | Light semantic color (lighter contrast tone). |
--color-medium | from theme (--ctp-latte-overlay0 / --ctp-mocha-overlay2) | Medium semantic color (mid-tone). |
--color-dark | from theme (--ctp-latte-text / --ctp-mocha-subtext1) | Dark semantic color (high contrast text). |
Ver Theming para la convención completa.