Components

A contextual menu for displaying a list of actions or options.

Installation

NPM packages are currently unstable and may cause issues. Use it at your own risk.
npm install @mijn-ui/react-dropdown-menu

Usage

import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuLabel,
  DropdownMenuSeparator,
  DropdownMenuTrigger,
} from "@mijn-ui/react-dropdown-menu"
<DropdownMenu>
  <DropdownMenuTrigger>Open</DropdownMenuTrigger>
  <DropdownMenuContent>
    <DropdownMenuLabel>My Account</DropdownMenuLabel>
    <DropdownMenuSeparator />
    <DropdownMenuItem>Profile</DropdownMenuItem>
    <DropdownMenuItem>Billing</DropdownMenuItem>
    <DropdownMenuItem>Team</DropdownMenuItem>
    <DropdownMenuItem>Subscription</DropdownMenuItem>
  </DropdownMenuContent>
</DropdownMenu>

Examples

Checkboxes

Radio Group


Slot NameTargeted ComponentPurpose
baseDropdownMenuStyles the root dropdown menu component.
triggerDropdownMenuTriggerStyles the trigger button for the menu.
contentDropdownMenuContentStyles the dropdown content.
itemDropdownMenuItemStyles individual dropdown menu items.
subTriggerDropdownMenuSubTriggerStyles the trigger for submenu activation.
subTriggerIconDropdownMenuSubTriggerStyles the icon within the submenu trigger.
subContentDropdownMenuSubContentStyles the content of the submenu content.
checkboxItemDropdownMenuCheckboxItemStyles the checkbox menu item.
checkboxItemIconWrapperDropdownMenuCheckboxItemStyles the wrapper for the checkbox icon.
checkboxItemIconDropdownMenuCheckboxItemStyles the checkbox icon.
radioItemDropdownMenuRadioItemStyles the radio menu item.
radioItemIconWrapperDropdownMenuRadioItemStyles the wrapper for the radio icon.
radioItemIconDropdownMenuRadioItemStyles the radio icon.
labelDropdownMenuLabelStyles the menu label.
separatorDropdownMenuSeparatorStyles the separator between menu items.
shortcutDropdownMenuShortcutStyles shortcut text within the menu.

On this page