Dropdown Menu

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

Was this example helpful?

Usage


import { DropdownMenu } from "@medusajs/ui"
1<DropdownMenu>2  <DropdownMenu.Trigger>Trigger</DropdownMenu.Trigger>3  <DropdownMenu.Content>4    <DropdownMenu.Item>Edit</DropdownMenu.Item>5    <DropdownMenu.Item>Add</DropdownMenu.Item>6    <DropdownMenu.Item>Delete</DropdownMenu.Item>7  </DropdownMenu.Content>8</DropdownMenu>

API Reference


This component is based on the Radix UI Dropdown Menu primitive.

DropdownMenu.Shortcut

This component is based on the span element and supports all props of this element.

DropdownMenu.Hint

This component is based on the span element and supports all props of this element.

Examples


Sorting

Implementing collection sorting choices using a Dropdown Menu:

Sorting: none
Was this example helpful?