Skip to content
Pixelbits
Docs / Site header
Blocks

Site header

A site header: brand, navigation and actions. On phones the links move into the kit's full-screen menu (cells dissolve, labels roll).

Installation

npm: import
import { SiteHeader } from "pixelbits/site-header";
shadcn: copy the source
npx shadcn add https://pixelbits.ali-moradi-develop.com/r/block-site-header.json

API

<SiteHeader>

A site header: brand, navigation and actions. On phones the links move into the kit's full-screen menu (cells dissolve, labels roll).

Example
<SiteHeader brand={<a href="/"><Logo /></a>} links={[{ label: "Work", href: "/work" }]} actions={<Button size="sm">Contact</Button>} />
PropTypeDefaultDescription
brand*ReactNode—

The logo or site name, linked to the home page by you.

links*MenuLink[]—

Main navigation. On phones it moves into a full-screen menu.

actionsReactNode—

Content at the end: a call to action, a theme switch, a search button.

stickybooleantrue

Stick to the top while scrolling, with a translucent background.

menuFooterReactNode—

Content under the links in the phone menu (contact, social).

Also accepts every prop of HTMLAttributes<HTMLElement>.