Installation
npx shadcn@latest add @iconiq/r-dropdownProps
Dropdown
Root provider that coordinates open state, selected value state, and the shared behavior used by the trigger, content, and item primitives.
childrenReactNodeRequired
valuestringdefaultValuestringonValueChange(value: string | undefined) => voidopenbooleandefaultOpenbooleanDefault false
onOpenChange(open: boolean) => voidvariant"select" | "action"Default select
classNamestringRadix DropdownMenu.Root and Trigger handle open state, focus restoration, outside interactions, and keyboard typeahead while the public Iconiq parts API stays the same.
The select and action variants keep the exact same trigger shell, chevron spring, row styling, and grouped layout as the core dropdown component.
This Radix version portals the menu content, then reuses the same visible motion timings and offsets from registry/dropdown.tsx.
DropdownTrigger
Interactive trigger button that opens and closes the menu. It works with plain children, DropdownValue, or custom trigger content like an avatar.
childrenReactNodeshowChevronbooleanDefault true
classNamestringdisabledbooleanThe trigger is always rendered as a button in this version, so custom trigger visuals should be passed as children and styled with className.
DropdownValue
Small helper for select mode that reads the current value from context and prints the matching item label or a placeholder.
placeholderstringDefault "Select an option"
classNamestringDropdownValue is only useful in select mode. Action menus usually provide their own trigger content instead.
DropdownContent
Animated menu surface that positions itself under the trigger and renders the item list for either variant.
childrenReactNodeRequired
align"start" | "center" | "end"Default start
sideOffsetnumberDefault 8
classNamestringThe motion layer is intentionally identical to the core dropdown: the same fade/slide entrance, the same delayed inner content settle, and the same rounded panel shell.
When you pass className="w-full", this Radix install maps that width to the trigger-width CSS variable so existing examples keep the same layout.
Radix manages collision-aware placement and focus, while the Iconiq layer preserves the original content styling and scroll treatment.
DropdownItem
Single interactive row used by both variants. In select mode it can register a value, and in action mode it acts like a plain command item.
childrenReactNodeRequired
valuestringtextValuestringonClick(event: MouseEvent<HTMLButtonElement>) => voiddisabledbooleanSelect items do not render a filled selected background in this version; only the trailing checkmark indicates the chosen value.
If you omit value in select mode, the item behaves like a plain closing action and will not update the current value.
DropdownGroup
Optional wrapper for chunking larger menus into sections, with or without a visible label.
childrenReactNodeRequired
labelReactNodelabelClassNamestringclassNamestringLabel is optional. Without it, the wrapper only provides spacing unless you also pass aria-label or aria-labelledby.
If you provide label, the wrapper upgrades to role=group and wires aria-labelledby automatically.
DropdownLabel
Standalone non-interactive heading helper for advanced content layouts or custom grouping patterns.
childrenReactNodeRequired
classNamestringUse this directly when you want a heading style without the convenience wrapper supplied by DropdownGroup.
DropdownSeparator
Simple divider for grouping related items inside the content surface.
classNamestringThe base separator uses the shared border token and a small vertical margin between item groups.
Registry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: @radix-ui/react-dropdown-menu, motion, lucide-react.
This page documents the Radix UI install only. Base UI does not ship an equivalent dropdown menu primitive in this comparison set.
The generated registry file is /r/r-dropdown.json.