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

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

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?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break