Docs
Dropdown Menu

Dropdown Menu

Displays a menu to the user — such as a set of actions or functions — triggered by a button.

Loading...
Loading...

Installation

npx shadcn-ng@latest add dropdown-menu
npm
yarn
pnpm
bun

Copy and paste the following code into your project.

Update the import paths to match your project setup.

Usage

import {
  UbDropdownMenuContentDirective,
  UbDropdownMenuItemDirective,
  UbDropdownMenuLabelDirective,
  UbDropdownMenuSeparator,
  UbDropdownMenuTrigger,
} from "@/components/ui/dropdown-menu"
<button [ubDropdownMenuTrigger]="menu">Open</button>
 
<ng-template #menu>
  <div ubDropdownMenuContent>
    <div ubDropdownMenuLabel>My Account</div>
    <div ubDropdownMenuSeparator></div>
    <div ubDropdownMenuItem>Profile</div>
    <div ubDropdownMenuItem>Billing</div>
    <div ubDropdownMenuItem>Team</div>
    <div ubDropdownMenuItem>Subscription</div>
  </div>
</ng-template>

Examples

Checkboxes

Loading...
Loading...

Radio Group

Loading...
Loading...