bearnie

Menubar

A visually persistent menu common in desktop applications that provides quick access to a consistent set of commands.

Installation

npx bearnie add menubar
npx bearnie add menubar

Usage

import {
  Menubar,
  MenubarContent,
  MenubarMegaItem,
  MenubarItem,
  MenubarMenu,
  MenubarSeparator,
  MenubarShortcut,
  MenubarTrigger,
} from "@/components/bearnie/menubar"
<Menubar>
  <MenubarMenu>
    <MenubarTrigger>File</MenubarTrigger>
    <MenubarContent>
      <MenubarItem>
        New Tab <MenubarShortcut>⌘T</MenubarShortcut>
      </MenubarItem>
      <MenubarItem>New Window</MenubarItem>
      <MenubarSeparator />
      <MenubarItem>Print</MenubarItem>
    </MenubarContent>
  </MenubarMenu>
</Menubar>

Examples

Checkbox

Use MenubarCheckboxItem for toggleable options.

Radio

Use MenubarRadioGroup and MenubarRadioItem for single-select options.

Icons

Use MenubarMegaItem variant="simple" in a regular MenubarContent when you just want a compact icon list without the larger mega-menu layout.

Use MenubarSub, MenubarSubTrigger, and MenubarSubContent for nested menus.

Mega menu

Use variant="mega" on MenubarContent with MenubarMegaItem when one trigger needs grouped navigation links and descriptions.

Props

Prop Type Default Description
class string - Additional CSS classes
Prop Type Default Description
class string - Additional CSS classes
Prop Type Default Description
align “start” | “center” | “end” “start” Alignment of the content
sideOffset number 4 Offset from the trigger
variant “default” | “mega” “default” Switches between compact dropdown and wider mega-menu styling
class string - Additional CSS classes
Prop Type Default Description
inset boolean false Adds left padding for alignment
disabled boolean false Disables the item
class string - Additional CSS classes
Prop Type Default Description
checked boolean false Initial checked state
disabled boolean false Disables the item
class string - Additional CSS classes
Prop Type Default Description
value string - Initial selected value
class string - Additional CSS classes
Prop Type Default Description
value string - Value of the radio item
disabled boolean false Disables the item
class string - Additional CSS classes
Prop Type Default Description
title string - Main heading text for the mega-menu entry
description string - Optional supporting description text
href string - Renders the entry as a link when provided
disabled boolean false Disables the item
variant “default” | “simple” “default” Uses either stacked description rows or a simple inline icon/list layout
class string - Additional CSS classes