Displays a menu to the user — such as a set of actions or functions — triggered by a button.
Installation
npx lovdacn@latest add dropdown-menu(You can also use the shortened lvcn alias, e.g., npx lvcn@latest add dropdown-menu)
This copies the component source into your project (typically components/ui/dropdown-menu.tsx) and installs any required dependencies.
Registry dependencies: utils, text, icon
Usage
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu"
import { Button } from "@/components/ui/button"
import { Text } from "@/components/ui/text"
export function Example() {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="outline">
<Text>Open</Text>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>
<Text>Profile</Text>
</DropdownMenuItem>
<DropdownMenuItem>
<Text>Settings</Text>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)
}Styles
lvcn components are available across all style packs:
| Style | Notes |
|---|---|
default | Classic rounded system |
new-york | Compact, refined |
nova | Sharp corners (default in many setups) |
luma / lyra / maia / mira | Radius & font variants |
rhea / sera / vega | Pill, zero-radius, balanced |
Style is set at project init via lvcn.json (style + styleEngine).
Platform
These components target Expo / React Native with NativeWind or Uniwind. They use Platform.select where web and native need different behavior.