Glass Menubar
washiveil/glass-menubarFreeComponent
Application menubar on the glass pill with strong-glass dropdowns, built on Radix Menubar.
Install it
npx shadcn@latest add https://washiveil.alexchih.com/r/glass-menubar.jsonSource
1'use client'23import * as React from 'react'4import { Menubar as MenubarPrimitive } from 'radix-ui'5import { Check, ChevronRight, Circle } from 'lucide-react'67import { cn } from '@/lib/utils'89const GlassMenubar = React.forwardRef<10 React.ComponentRef<typeof MenubarPrimitive.Root>,11 React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>12>(({ className, ...props }, ref) => (13 <MenubarPrimitive.Root14 ref={ref}15 className={cn(16 'flex items-center gap-1 rounded-full border border-muted bg-muted p-1 backdrop-blur',17 className,18 )}19 {...props}20 />21))22GlassMenubar.displayName = MenubarPrimitive.Root.displayName2324const GlassMenubarMenu = MenubarPrimitive.Menu2526const GlassMenubarGroup = MenubarPrimitive.Group2728const GlassMenubarPortal = MenubarPrimitive.Portal2930const GlassMenubarSub = MenubarPrimitive.Sub3132const GlassMenubarRadioGroup = MenubarPrimitive.RadioGroup3334const GlassMenubarTrigger = React.forwardRef<35 React.ComponentRef<typeof MenubarPrimitive.Trigger>,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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',42 className,43 )}44 {...props}45 />46))47GlassMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName4849const GlassMenubarSubTrigger = React.forwardRef<50 React.ComponentRef<typeof MenubarPrimitive.SubTrigger>,51 React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {52 inset?: boolean53 }54>(({ className, inset, children, ...props }, ref) => (55 <MenubarPrimitive.SubTrigger56 ref={ref}57 className={cn(58 'flex cursor-default select-none items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground focus:ring-2 focus:ring-inset focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',59 inset && 'pl-8',60 className,61 )}62 {...props}63 >64 {children}65 <ChevronRight className="ml-auto" />66 </MenubarPrimitive.SubTrigger>67))68GlassMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName6970// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from washiveil
All 58 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Ambient Fieldambient-field | washiveil | Components | Free | no deps | |
| Chipchip | washiveil | Components | Free | 1 dep | |
| Code Badgecode-badge | washiveil | Components | Free | no deps | |
| Glass Accordionglass-accordion | washiveil | Components | Free | 2 deps | |
| Glass Alertglass-alert | washiveil | Components | Free | 1 dep | |
| Glass Alert Dialogglass-alert-dialog | washiveil | Components | Free | 1 dep | |
| Glass Aspect Ratioglass-aspect-ratio | washiveil | Components | Free | 1 dep | |
| Glass Avatarglass-avatar | washiveil | Components | Free | 1 dep |
