Menu#

Vertical menu component for navigation with support for nested items, icons, and active states.

Import#

TSX
import { Menu, Row, Text } from '@sigx/daisyui';

Basic Menu#

TSX
Loading preview...

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.

TSX
Loading preview...

Use model binding to track the active menu item:

TSX
Loading preview...
TSX
Loading preview...
TSX
Loading preview...

Nested Menu (Submenu)#

TSX
Loading preview...
TSX
Loading preview...

Horizontal Menu#

TSX
Loading preview...
TSX
Loading preview...

Disabled Items#

TSX
Loading preview...
TSX
Loading preview...

Props#

PropTypeDefaultDescription
model() => string-Two-way binding for active item
size'xs' | 'sm' | 'md' | 'lg''md'Menu item size
horizontalbooleanfalseHorizontal layout
backgroundBackgroundColor-Panel background (e.g. "base-200") — theme-aware
roundedRadiusValue | boolean-Corner rounding. Theme radii "box" / "field" / "selector" (or fixed sm3xl/full); true → box
widthSizeValue-Menu width — Tailwind step ("56"=14rem) or unitful value ("560px"). daisyUI menus are fit-content by default
paddingSpacing-Inner padding
classstring-Additional CSS classes

Menu items are already rounded by the theme's field radius. The background/rounded props above style the whole menu panel (rounded uses the theme box radius); you can also wrap the menu in a box container (Col/Row) if you prefer.

PropTypeDefaultDescription
valuestring-Value for model binding
activebooleanfalseForce active state
hrefstring-Render the item as a real link (<a href>); menu-active is applied automatically
asChildbooleanfalseRender 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
submenubooleanfalseRender slot directly (no <a> wrap) for a nested <details> submenu
disabledbooleanfalseDisable the item
classstring-Additional CSS classes
PropTypeDefaultDescription
classstring-Additional CSS classes

Events#

EventTypeDescription
update:modelValue(value: string) => voidEmitted when active item changes