Skip to content

An iPhone OS navigation bar: 44px blue-grey glossy bar with an embossed white title, a pointed back button and bar-button actions.

Installation

Requires the theme. Register the @skeuomorph namespace and add @skeuomorph/skeuomorph first, as shown in the installation guide. The CLI also pulls it in as a dependency.

pnpm dlx shadcn@latest add @skeuomorph/navigation-bar

Without the namespace, install straight from the URL:

pnpm dlx shadcn@latest add https://ui-skeuomorph.vercel.app/r/navigation-bar.json

Usage

import {
  NavigationBar,
  NavigationBarAction,
  NavigationBarBack,
  NavigationBarTitle,
} from "@/components/ui/navigation-bar"
<NavigationBar>
  <NavigationBarBack onBack={() => router.back()}>Settings</NavigationBarBack>
  <NavigationBarTitle>General</NavigationBarTitle>
  <NavigationBarAction variant="chrome">Edit</NavigationBarAction>
</NavigationBar>

API

ComponentProps
NavigationBarEvery header prop. Lays out its children at 44px tall.
NavigationBarBackEvery button prop plus onBack?: () => void.
NavigationBarTitleEvery div prop plus asChild to render your own heading (e.g. an h1). Centred over the whole bar.
NavigationBarActionEvery button prop plus variant?: "text" | "chrome" | "aqua" (default "text"). chrome is a bordered bar button, aqua the blue Done button.

Give NavigationBarBack a short label, as iPhone OS did: the title of the previous screen.