Menubar
glasswave/menubarFreeComponent
Horizontal menu bar with nested dropdowns.
Live preview
live · rendered by the registry
Rendered by glasswave on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glasswave.denizisik.com/r/menubar.jsonSource
1"use client";23import * as MenubarPrimitive from "@radix-ui/react-menubar";4import { Check, ChevronRight, Circle } from "lucide-react";5import { forwardRef } from "react";6import { cn } from "@/lib/utils";7import { glass, glassBase, textOnGlass } from "@/lib/glass";8import {9 menuContentClass,10 menuItemClass,11 menuLabelClass,12 menuSeparatorClass,13} from "@/lib/menu-classes";1415export const Menubar = forwardRef<16 HTMLDivElement,17 React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>18>(({ className, ...props }, ref) => (19 <MenubarPrimitive.Root20 ref={ref}21 className={cn(22 glassBase,23 textOnGlass,24 "relative flex h-11 items-center gap-1 rounded-full border border-black/[0.08] px-1.5 shadow-sm dark:border-white/[0.25]",25 className,26 )}27 {...props}28 />29));30Menubar.displayName = MenubarPrimitive.Root.displayName;3132export const MenubarMenu: typeof MenubarPrimitive.Menu = MenubarPrimitive.Menu;3334export const MenubarTrigger = forwardRef<35 HTMLButtonElement,36 React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>37>(({ className, ...props }, ref) => (38 <MenubarPrimitive.Trigger39 ref={ref}40 className={cn(41 "flex cursor-default select-none items-center rounded-full px-3 py-1.5 text-sm font-medium outline-none",42 "data-[state=open]:bg-black/[0.06] dark:data-[state=open]:bg-white/15 data-[highlighted]:bg-black/[0.05] dark:data-[highlighted]:bg-white/10",43 className,44 )}45 {...props}46 />47));48MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;4950export const MenubarContent = forwardRef<51 HTMLDivElement,52 React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>53>(54 (55 { className, align = "start", alignOffset = -4, sideOffset = 8, ...props },56 ref,57 ) => (58 <MenubarPrimitive.Portal>59 <MenubarPrimitive.Content60 ref={ref}61 align={align}62 alignOffset={alignOffset}63 sideOffset={sideOffset}64 className={cn(65 glass,66 menuContentClass,67 "animate-in fade-in-0 zoom-in-95",68 className,69 )}70 {...props}71 />72 </MenubarPrimitive.Portal>73 ),74);75MenubarContent.displayName = MenubarPrimitive.Content.displayName;7677export const MenubarItem = forwardRef<78 HTMLDivElement,79 React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {80 inset?: boolean;81 }82>(({ className, inset, ...props }, ref) => (83 <MenubarPrimitive.Item84 ref={ref}85// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from glasswave
All 60 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | glasswave | Components | Free | 2 deps | |
| Alertalert | glasswave | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | glasswave | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | glasswave | Components | Free | 1 dep | |
| Avataravatar | glasswave | Components | Free | 1 dep | |
| Badgebadge | glasswave | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | glasswave | Components | Free | 2 deps | |
| Buttonbutton | glasswave | Components | Free | 2 deps |
