Skip to content
Ballpoint

Menubar

A row of menus, File Edit View: arrow keys move between them, and pointing at the next one opens it.

From shadcn/ui
Built on Base UI Menubar

Installation

pnpm dlx shadcn@latest add @ballpoint/menubar

Usage

tsx
import { Menubar, MenubarContent, MenubarItem, MenubarMenu, MenubarTrigger } from "@/components/ui/menubar"

<Menubar>
  <MenubarMenu>
    <MenubarTrigger>File</MenubarTrigger>
    <MenubarContent>
      <MenubarItem>New page</MenubarItem>
    </MenubarContent>
  </MenubarMenu>
</Menubar>

Examples

Items that carry an icon, and a destructive one last.

API reference

Menubar
—

The bar is drawn round the menus; it takes the pen settings and a seed.

MenubarItem variant
default "default"
"default" | "destructive"

A destructive item is shaded in red pen.

MenubarCheckboxItem / RadioItem
—

Ticked and dotted choices.

MenubarSub / SubTrigger / SubContent
—

A nested menu.

seed
string | number

Pins the drawing.

Every other prop goes to Base UI's Menubar.

Pen settings

The drawing also takes draw, roughness, passes, radius, corners, shadow, weight and speed, as props or from the nearest InkProvider. What each one does.