Menubar
rivelle/menubarFreeComponent
A desktop-style accessible menu bar with nested actions.
Live preview
live · rendered by the registry
Rendered by rivelle on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://rivelle.dev/r/menubar.jsonSource
1"use client";23import * as React from "react";4import * as MenubarPrimitive from "@radix-ui/react-menubar";5import { Check, ChevronRight, Circle } from "lucide-react";67import { cn } from "@/lib/utils";89function Menubar({10 className,11 ...props12}: React.ComponentProps<typeof MenubarPrimitive.Root>) {13 return (14 <MenubarPrimitive.Root15 data-slot="menubar"16 className={cn(17 "flex h-11 items-center gap-1 rounded-2xl border border-foreground/10 bg-background/75 p-1.5 shadow-[inset_0_1px_0_color-mix(in_oklch,var(--background)_75%,transparent)]",18 className,19 )}20 {...props}21 />22 );23}2425const MenubarMenu = MenubarPrimitive.Menu;26const MenubarGroup = MenubarPrimitive.Group;27const MenubarPortal = MenubarPrimitive.Portal;28const MenubarRadioGroup = MenubarPrimitive.RadioGroup;29const MenubarSub = MenubarPrimitive.Sub;3031function MenubarTrigger({32 className,33 ...props34}: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {35 return (36 <MenubarPrimitive.Trigger37 data-slot="menubar-trigger"38 className={cn(39 "flex cursor-default select-none items-center rounded-xl px-3 py-1.5 text-sm font-semibold outline-none transition-colors focus:bg-foreground/[.055] data-[state=open]:bg-primary/10 data-[state=open]:text-primary",40 className,41 )}42 {...props}43 />44 );45}4647function MenubarContent({48 className,49 align = "start",50 alignOffset = -4,51 sideOffset = 8,52 ...props53}: React.ComponentProps<typeof MenubarPrimitive.Content>) {54 return (55 <MenubarPortal>56 <MenubarPrimitive.Content57 data-slot="menubar-content"58 align={align}59 alignOffset={alignOffset}60 sideOffset={sideOffset}61 className={cn(62 "z-50 min-w-52 overflow-hidden rounded-2xl border border-foreground/10 bg-popover/96 p-1.5 text-popover-foreground shadow-[0_24px_60px_-22px_color-mix(in_oklch,var(--foreground)_30%,transparent),inset_0_1px_0_color-mix(in_oklch,var(--background)_72%,transparent)] backdrop-blur-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",63 className,64 )}65 {...props}66 />67 </MenubarPortal>68 );69}7071function MenubarItem({72 className,73 inset,74 variant = "default",75 ...props76}: React.ComponentProps<typeof MenubarPrimitive.Item> & {77 inset?: boolean;78 variant?: "default" | "destructive";79}) {80 return (81// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from rivelle
All 83 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | rivelle | Components | Free | 2 deps | |
| Alertalert | rivelle | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | rivelle | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | rivelle | Components | Free | 1 dep | |
| Avataravatar | rivelle | Components | Free | 1 dep | |
| Badgebadge | rivelle | Components | Free | 2 deps | |
| Breadcrumbbreadcrumb | rivelle | Components | Free | 2 deps | |
| Buttonbutton | rivelle | Components | Free | 2 deps |
