Skip to content

Menu ​

Terminal-style vertical menu with items, dividers, disabled and custom slot.

Menu

Design lines ​

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 ​

PropTypeDefaultDescription
itemsArray<{label, icon?, disabled?, divider?}>[]Menu items
color'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark''primary'Active item color
activeIndexnumber-1Highlighted item index
design'tuix' | 'rubik'— (inherits from data-design)Design line (or inherit from data-design).

items — each item has this shape:

FieldTypeRequiredDescription
labelstring✅Item text
iconstring❌Optional icon or emoji
disabledboolean❌Disabled item
dividerboolean❌Separator line

Events ​

EventPayloadDescription
selectindex: numberEmitted when clicking an item

Slots ​

SlotPropsDescription
default—Alternative to items
item{ item, index, active }Custom per-item rendering

CSS Custom Properties ​

TokenDefaultDescription
--font-mono"JetBrains Mono", ui-monospace, monospaceMonospace font stack for code-like content (key labels, log lines, chips).
--accentfrom theme (--ctp-latte-mauve / --ctp-mocha-mauve)Accent color, mapped from the active semantic color.
--bgfrom theme (--ctp-latte-base / --ctp-mocha-base)Base background of the surface.
--bg-altfrom theme (--ctp-latte-mantle / --ctp-mocha-mantle)Alternate background (the next layer down from the base).
--bg-panelfrom theme (--ctp-latte-surface1 / --ctp-mocha-surface1)Background of panel-like raised surfaces (cards, accordions).
--borderfrom theme (--ctp-latte-surface0 / --ctp-mocha-surface0)Outline and divider color for surfaces.
--textfrom theme (--ctp-latte-text / --ctp-mocha-text)Primary text color used inside the component.
--color-primaryfrom theme (--ctp-latte-mauve / --ctp-mocha-mauve)Primary semantic color (mauve in Catppuccin).
--color-secondaryfrom theme (--ctp-latte-lavender / --ctp-mocha-lavender)Secondary semantic color (lavender in Catppuccin).
--color-tertiaryfrom theme (--ctp-latte-blue / --ctp-mocha-blue)Tertiary semantic color (blue in Catppuccin).
--color-successfrom theme (--ctp-latte-green / --ctp-mocha-green)Success semantic color (green in Catppuccin).
--color-warningfrom theme (--ctp-latte-yellow / --ctp-mocha-yellow)Warning semantic color (yellow in Catppuccin).
--color-dangerfrom theme (--ctp-latte-red / --ctp-mocha-red)Danger semantic color (red in Catppuccin).
--color-lightfrom theme (--ctp-latte-surface1 / --ctp-mocha-rosewater)Light semantic color (lighter contrast tone).
--color-mediumfrom theme (--ctp-latte-overlay0 / --ctp-mocha-overlay2)Medium semantic color (mid-tone).
--color-darkfrom theme (--ctp-latte-text / --ctp-mocha-subtext1)Dark semantic color (high contrast text).

Ver Theming para la convención completa.