Displays a menu to the user — such as a set of actions or functions — triggered by a button. Built on top of Radix Dropdown Menu.
import { Button } from "@ngrok/mantle/button";
import { DropdownMenu } from "@ngrok/mantle/dropdown-menu";
import { Icon } from "@ngrok/mantle/icon";
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild>
<Button appearance="filled" type="button">
Open Menu
</Button>
</DropdownMenu.Trigger>
<DropdownMenu.Content>
<DropdownMenu.Label>corby.pickles@ngork.com</DropdownMenu.Label>
<DropdownMenu.Separator />
<DropdownMenu.RadioItem name="theme" value="system">
<Icon svg={<DesktopIcon />} />
System Preference
</DropdownMenu.RadioItem>
<DropdownMenu.Separator />
<DropdownMenu.Item>
<Icon svg={<GearIcon />} />
User Settings
</DropdownMenu.Item>
<DropdownMenu.Separator />
<DropdownMenu.Item>
<Icon svg={<SignOutIcon />} />
Log out
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Root>;The DropdownMenu components are built on top of Radix Dropdown Menu.
The root, stateful component that manages the open/closed state of the dropdown menu.
The trigger button that opens the dropdown menu.
The container for the dropdown menu content. Appears in a portal with scrolling and animations.
All props from Radix DropdownMenu.Content, plus:
A standard item in the dropdown menu that can be selected or activated.
A menu item with a checkbox that can be controlled or uncontrolled.
All props from Radix DropdownMenu.CheckboxItem, including:
A radio group container for exclusive selection within the dropdown menu.
A radio item where only one item in the group can be selected at a time.
All props from Radix DropdownMenu.RadioItem, including:
A label for grouping and describing sections within the dropdown menu.
A group container for organizing related dropdown menu items. Accepts all props from Radix DropdownMenu.Group.
A visual separator for dividing sections within the dropdown menu. All props from Separator.
A keyboard shortcut indicator for dropdown menu items. All props from span.
A submenu container for creating nested dropdown menus. Accepts all props from Radix DropdownMenu.Sub.
The trigger item that opens a submenu when hovered or focused.
The content container for submenu items. Appears in a portal with scrolling and animations.