Dropdown Menu
aqua/dropdown-menuFreeComponent
Aqua context menu: white panel, gel highlight, checkable items and submenus.
Live preview
live · rendered by the registry
Rendered by aqua on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://aqua.duca.dev/r/dropdown-menu.jsonSource
1"use client"23import * as React from "react"4import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"5import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"67import { cn } from "@/lib/utils"89function DropdownMenu({10 ...props11}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {12 return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />13}1415function DropdownMenuTrigger({16 ...props17}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {18 return (19 <DropdownMenuPrimitive.Trigger20 data-slot="dropdown-menu-trigger"21 {...props}22 />23 )24}2526function DropdownMenuGroup({27 ...props28}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {29 return <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />30}3132function DropdownMenuContent({33 className,34 sideOffset = 4,35 ...props36}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {37 return (38 <DropdownMenuPrimitive.Portal>39 <DropdownMenuPrimitive.Content40 data-slot="dropdown-menu-content"41 sideOffset={sideOffset}42 className={cn(43 "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[10rem] overflow-y-auto overflow-x-hidden rounded-lg border border-[#9599a1] bg-white py-1 shadow-[0_1px_0_rgba(255,255,255,0.9)_inset,0_10px_28px_rgba(20,30,50,0.3),0_2px_6px_rgba(20,30,50,0.15)] data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",44 className45 )}46 {...props}47 />48 </DropdownMenuPrimitive.Portal>49 )50}5152const menuItemClass =53 "relative flex cursor-default select-none items-center gap-2 py-1 pl-7 pr-3 text-[13px] text-[#33383f] outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-[linear-gradient(180deg,var(--aqua-gel-hi,#7db9f5)_0%,var(--aqua-gel-mid,#3c86e4)_50%,var(--aqua-gel-deep,#2668c4)_51%,var(--aqua-gel-light,#5da3ef)_100%)] data-[highlighted]:text-white data-[highlighted]:[text-shadow:0_-1px_1px_rgba(10,40,90,0.4)]"5455function DropdownMenuItem({56 className,57 variant = "default",58 ...props59}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {60 variant?: "default" | "destructive"61}) {62 return (63 <DropdownMenuPrimitive.Item64 data-slot="dropdown-menu-item"65 data-variant={variant}66 className={cn(67 menuItemClass,68 variant === "destructive" &&69// … truncated
What it pulls in
npm packages
Files it writes
More from aqua
All 26 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Alertalert | aqua | Components | Free | 1 dep | |
| Avataravatar | aqua | Components | Free | 1 dep | |
| Badgebadge | aqua | Components | Free | 2 deps | |
| Buttonbutton | aqua | Components | Free | 2 deps | |
| Chat Bubblechat-bubble | aqua | Components | Free | no deps | |
| Checkboxcheckbox | aqua | Components | Free | 2 deps | |
| Code Blockcode-block | aqua | Components | Free | 2 deps · 2 files | |
| Cursorcursor | aqua | Components | Free | no deps |
