Overlays
Dropdown menu
A list of actions from a button: with icons, shortcuts, checked items and submenus, and typing to find.
Overlays
A list of actions from a button: with icons, shortcuts, checked items and submenus, and typing to find.
Change the props on the right, then open the menu. variant is the Delete item's, disabled the Duplicate item's.
import { Button } from 'omuk-ui/button';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from 'omuk-ui/dropdown-menu';
<DropdownMenu>
<DropdownMenuTrigger render={<Button variant="outline" />}>
Options
</DropdownMenuTrigger>
<DropdownMenuContent className="w-56">
<DropdownMenuItem>Rename</DropdownMenuItem>
<DropdownMenuItem>Duplicate</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem variant="destructive">Delete</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>An icon at the start of each item, a shortcut at the end. A destructive item comes last, after a separator.
Radio items pick one value, a checkbox item turns a setting on or off. A tick marks the current value, at the start of the row.