HextaUI

Menubar: Vertical

orientation="vertical" stacks the menus and switches navigation to the up and down arrows. Open the menus to the side with side="inline-end".

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

const menus = [
  { label: "Projects", items: ["All projects", "Starred", "Archived"] },
  { label: "Team", items: ["Members", "Roles", "Invitations"] },
  { label: "Billing", items: ["Plan", "Invoices", "Payment method"] },
]

export function MenubarVertical() {
  return (
    <Menubar aria-label="Workspace" orientation="vertical">
      {menus.map((menu) => (
        <MenubarMenu key={menu.label}>
          <MenubarTrigger>{menu.label}</MenubarTrigger>
          <MenubarContent side="inline-end" align="start" sideOffset={8}>
            {menu.items.map((item) => (
              <MenubarItem key={item}>{item}</MenubarItem>
            ))}
          </MenubarContent>
        </MenubarMenu>
      ))}
    </Menubar>
  )
}

This adds the example as components/examples/menubar/vertical.tsx, together with the Menubar component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/menubar-vertical.json

To add only the component, follow the Menubar installation.

Props in this example

The Menubar props this example sets, from the API reference.

PropTypeDefault
orientation
"horizontal" | "vertical""horizontal"
PropTypeDefault
side
"top" | "bottom" | "left" | "right" | "inline-start" | "inline-end""bottom"
align
"start" | "center" | "end""start"
sideOffset
number8

Every prop is in the Menubar API reference.

See them all, with keyboard support and accessibility notes, on the Menubar page.