AhaSlides Design
v0.52.0React · Vue · Lit

Components · Navigation

Menu

A list of selectable options — a side nav, a settings list, an overflow menu — with icons, groups, submenus and danger actions.

Examples

Mode
Content
Menu · icons · a group · a submenu · a disabled row · a danger action

API

PropTypeDefaultNotes
itemsJSON tree[]Rows. Leaf {key,label,icon?,disabled?,danger?}; submenu {key,label,icon?,children:[]}; section {type:'group',label,children:[]}; rule {type:'divider'}
valuestringThe selected item's key (brand-tinted row)
mode'vertical' | 'inline' | 'horizontal'verticalLayout: compact list · indented sidebar tree · top nav bar
selectCustomEventComposed event on selection, detail { key }

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/aha-menu';   // registers <aha-menu>

Agent feed for this component (absolute, fetchable anywhere): menu.agent.json · menu.md · menu.llms.txt

When to use

When to use
  • Menu — a list of destinations or options — a side nav, a settings list, an overflow list
  • Tabs — switching horizontal views within one screen
  • Dropdown — the same list should sit inside a triggered overlay, not inline
One selection at a time — reserve the brand tint for the active row. Keep labels short and in sentence case. Group related rows under a title; rule off a destructive action with a divider and mark it danger. For a triggered overlay, put a Menu inside a Dropdown rather than reinventing the list.
Surfaces
editor dashboard settings admin

Spec

Container white surface, 1px border #E3E3E3, radius 8, 6 padding, min-width 200 · Row height 36 · radius 8 · SemiBold 600 · 10px gap to a 16px leading icon · Group title 11px uppercase, text-tertiary #8A8A8A, non-interactive section header · Divider 1px split #F1F1F1 rule, role=separator · Submenu caret rotates 90° + children expand inline (motion-mid), aria-expanded synced · Hover bg-hover #F7F7F7 (motion-fast + ease-out, persistent node) · Selected bg-accent #F9F5FF fill + color-primary #6A1EBB text · Danger color-error #F5222D text, error-tinted hover · Disabled text-disabled #B5B5B5, not-allowed