Dropdown Menu
An action sheet that slides up from the bottom on phones, and a menu next to its button from 768px up. You write the items once.
Default
On a phone the items become large touch rows with a separate Cancel button. Keyboard shortcuts only show in the desktop menu.
Preview
Checkbox items and labels
Preview
Layout
layout="responsive" is the default. Use "menu" or "sheet" to keep one form on every screen.
Preview
Installation
npx glass-orbit add dropdown-menu
Usage
import {
DropdownMenu, DropdownMenuTrigger, DropdownMenuContent,
DropdownMenuItem, DropdownMenuSeparator,
} from "@/components/glass-orbit/dropdown-menu"API Reference
layout
"responsive" | "menu" | "sheet" — on DropdownMenu (default responsive)
title
string — on DropdownMenuContent: the sheet heading, and the menu's label for screen readers
cancelLabel
string | null — on DropdownMenuContent: text of the sheet's Cancel button, null hides it
variant
"default" | "destructive" — on DropdownMenuItem
onSelect
(event: Event) => void — on items; call event.preventDefault() to keep it open