Menu
Create context menus, dropdowns, and nested navigation with ease.
Examples
"use client";
import { Button, Menu, MenuItem } from "@g4rcez/components";
function CustomMenuStyling() {
return (
<Card title="Custom component item">
<Menu title="I'm a menu" label={<Button>I'm a menu</Button>} asChild>
<MenuItem
title="OK"
className="focus:bg-danger hover:bg-danger hover:text-danger-foreground"
>
Danger Custom
</MenuItem>
<MenuItem
title="OK"
className="focus:bg-success hover:bg-success hover:text-success-foreground"
>
Success custom
</MenuItem>
<MenuItem
title="OK"
className="focus:bg-info hover:bg-info hover:text-info-foreground"
>
Info custom
</MenuItem>
</Menu>
</Card>
);
}When to use Menu
Use when
You need the documented Menu interaction or presentation in a product workflow.
Avoid when
A native HTML element already provides the Menu behavior you need.
Accessibility
Keep the Menu labeled and use its documented keyboard interaction. The component preserves visible focus and communicates state without relying on color alone.
- Keep keyboard focus visible and follow the documented key commands.
- Provide an accessible name and connect descriptions or errors to the control.