Skip to content

Page bar

The bar at the top of a page: a link to its parent, the title and the page's actions, pinned as it scrolls.

LayoutNavigation
npx shadcn@latest add @silicon-ui/page-bar

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/page-bar

Manually

  1. Copy these files into your project

    • components/silicon-ui/page-bar/page-bar.tsx
    • components/silicon-ui/page-bar/page-bar.module.css
  2. Add the foundation, once per app, for the design and motion tokens

    npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

usage.tsx
import { PageBar } from "@/components/silicon-ui/page-bar/page-bar";

API reference

PropTypeDefault
title*

The page's title, its h1.

ReactNode—
parent

A link back up, on nested pages: a crumb above the title. A page in the sidebar has none, so the bar is one line shorter.

{ label: string; href: string }—
titleId

The h1's id, for a region or dialog that is named by the title.

string—
actions

The page's supporting buttons, at the title's end.

ReactNode—
className

Placement only.

string—

Dependencies

npm
None
Registry
silicon-motion-tokensbreadcrumb