Menu
Vertical menu component for navigation with support for nested items, icons, and active states.
Import
import { Menu, Row, Text } from '@sigx/daisyui';
Basic Menu
Loading preview...
Links
By default a Menu.Item wraps its content in an <a> for styling. To make it a
real navigable link, pass href. To use your own interactive element (a router
<Link>, a <button>, …) without nesting interactive elements, pass asChild
and provide the element yourself.
Loading preview...
Menu with Active Item
Use model binding to track the active menu item:
Loading preview...
Menu with Icons
Loading preview...
Menu with Title
Loading preview...
Nested Menu (Submenu)
Loading preview...
Menu Sizes
Loading preview...
Horizontal Menu
Loading preview...
Menu with Badges
Loading preview...
Disabled Items
Loading preview...
Sidebar Navigation Example
Loading preview...
Props
Menu Props
| Prop | Type | Default | Description |
|---|---|---|---|
model | () => string | - | Two-way binding for active item |
size | 'xs' | 'sm' | 'md' | 'lg' | 'md' | Menu item size |
horizontal | boolean | false | Horizontal layout |
background | BackgroundColor | - | Panel background (e.g. "base-200") — theme-aware |
rounded | RadiusValue | boolean | - | Corner rounding. Theme radii "box" / "field" / "selector" (or fixed sm…3xl/full); true → box |
width | SizeValue | - | Menu width — Tailwind step ("56"=14rem) or unitful value ("560px"). daisyUI menus are fit-content by default |
padding | Spacing | - | Inner padding |
class | string | - | Additional CSS classes |
Menu items are already rounded by the theme's field radius. The
background/roundedprops above style the whole menu panel (roundeduses the theme box radius); you can also wrap the menu in a box container (Col/Row) if you prefer.
Menu.Item Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | Value for model binding |
active | boolean | false | Force active state |
href | string | - | Render the item as a real link (<a href>); menu-active is applied automatically |
asChild | boolean | false | Render the slot directly (no <a> wrap) so you can supply your own <a>/<button>/router <Link> without nesting interactive elements. You own the active styling |
submenu | boolean | false | Render slot directly (no <a> wrap) for a nested <details> submenu |
disabled | boolean | false | Disable the item |
class | string | - | Additional CSS classes |
Menu.Title Props
| Prop | Type | Default | Description |
|---|---|---|---|
class | string | - | Additional CSS classes |
Events
| Event | Type | Description |
|---|---|---|
update:modelValue | (value: string) => void | Emitted when active item changes |