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#


Code
import { DropdownMenu } from "@medusajs/ui"
Code
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#


DropdownMenu.Shortcut

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

DropdownMenu.Hint

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

Examples#


Sorting#

Implementing collection sorting choices using a Dropdown Menu:

Sorting: none
Was this example helpful?