Navbar

Navbar is a neobrutalist React component from Cruise UI. The top bar: logo, links and actions, with a Menu drawer on phones. Install it with npx shadcn@latest add @cruiseui/navbar.

Install

Terminal

npx shadcn@latest add @cruiseui/navbar

First time? Installation shows the one-off components.json setup (the @cruiseui registry) and how to turn the theme on.

Example

Corners

When to use it

When to use

Every page's top navigation.

When not to

In-page section switching (use Tabs).

Props

CruiseNavbar

PropTypeDefaultDescription
logoReactNode——
links?CruiseNavLink[][]Inline from 768px; in the Menu drawer below that.
actions?ReactNode—The primary CTA plus any toggles: on the right from 768px, stacked at the bottom of the Menu drawer below that. Use the "inverted" Button variant when tone is "primary", and pass `drawerActions` too.
drawerActions?ReactNodeactionsActions for the drawer, if they differ from `actions`. The drawer is --surface, so a yellow-navbar "inverted" CTA should become "primary".
tone?"primary" | "paper""paper"—
drawerContainer?HTMLElement | null—Where the mobile drawer renders; defaults to <body>.
menuBelow?"lg" | "md""md"Show the Menu drawer below this breakpoint (768px by default). Use "lg" (1024px) when the actions are too wide to sit inline on a tablet.
className?string——

Accessibility

  • The current page link has aria-current="page".
  • On phones a Menu button opens a drawer with Esc, focus trap and scroll lock.