BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/ora-ui/dropdown-menu

dropdown-menu

ora-ui/dropdown-menu
FreeComponent

ora-ui publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by ora-ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://ora-ui.com/r/dropdown-menu.json

Source

registry/ui/dropdown-menu.tsxora-ui.com/r/dropdown-menu.json · first 6 KB
1'use client';
2
3import * as React from 'react';
4import { Menu as MenuPrimitive } from '@base-ui/react/menu';
5
6import { cn } from '@/registry/lib/utils';
7import { CheckIcon, CaretRightIcon as ChevronRightIcon } from '@phosphor-icons/react';
8
9type DropdownVariant = 'soft' | 'solid';
10type DropdownTheme = 'gray' | 'accent';
11
12interface DropdownMenuContextValue {
13 variant: DropdownVariant;
14 theme: DropdownTheme;
15}
16
17const DropdownMenuContext = React.createContext<DropdownMenuContextValue>({
18 variant: 'soft',
19 theme: 'gray',
20});
21
22function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
23 return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
24}
25function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
26 return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />;
27}
28function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
29 return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />;
30}
31function DropdownMenuContent({
32 align = 'start',
33 alignOffset = 0,
34 side = 'bottom',
35 sideOffset = 4,
36 variant = 'soft',
37 theme = 'gray',
38 className,
39 ...props
40}: MenuPrimitive.Popup.Props &
41 Pick<MenuPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'> & {
42 variant?: DropdownVariant;
43 theme?: DropdownTheme;
44 }) {
45 return (
46 <DropdownMenuContext.Provider value={{ variant, theme }}>
47 <MenuPrimitive.Portal>
48 <MenuPrimitive.Positioner
49 className="isolate z-50 outline-none"
50 align={align}
51 alignOffset={alignOffset}
52 side={side}
53 sideOffset={sideOffset}
54 >
55 <MenuPrimitive.Popup
56 data-slot="dropdown-menu-content"
57 data-variant={variant}
58 data-theme={theme !== 'gray' ? theme : undefined}
59 className={cn(menuContentBaseStyles, className)}
60 {...props}
61 />
62 </MenuPrimitive.Positioner>
63 </MenuPrimitive.Portal>
64 </DropdownMenuContext.Provider>
65 );
66}
67function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
68 return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />;
69}
70function DropdownMenuLabel({
71 className,
72 inset,
73 ...props
74}: MenuPrimitive.GroupLabel.Props & {
75 inset?: boolean;
76}) {
77 return (
78 <MenuPrimitive.GroupLabel
79 data-slot="dropdown-menu-label"
80 data-inset={inset}
81 className={cn(
82// … truncated

What it pulls in

npm packages

  • @base-ui/react
  • @phosphor-icons/react

Other registry items

  • utils

Files it writes

  • registry/ui/dropdown-menu.tsx

Facts

Registry
ora-ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
today

Go to the source

Docs on ora-ui ora-ui.com ora-ui/ora-ui on GitHub Raw registry item This item as JSON

More from ora-ui

All 31 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionora-uiComponentsFree2 deps
alert-dialogalert-dialogora-uiComponentsFree1 dep
avataravatarora-uiComponentsFree1 dep
avatar-groupavatar-groupora-uiComponentsFreeno deps
badgebadgeora-uiComponentsFree2 deps
buttonbuttonora-uiComponentsFree2 deps
button-groupbutton-groupora-uiComponentsFree2 deps
checkboxcheckboxora-uiComponentsFree3 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex