Status Page Header
openstatus/status-page-headerFreeBlock
Presentation-only header chrome (brand, nav, actions). Routing-agnostic — apps inject their own Link component via asChild
Install it
npx shadcn@latest add https://openstatus.dev/r/status-page-header.jsonSource
1"use client";23import { Button } from "@/components/ui/button";4import { cn } from "@/lib/utils";56/**7 * StatusPageHeader — presentation-only header chrome.8 *9 * Compose with `StatusPageHeaderContent`, `StatusPageHeaderBrand`,10 * `StatusPageHeaderNav` (+ `Item`), and `StatusPageHeaderActions`. Embed11 * gating, route-aware active state, mobile menu shell, brand link target,12 * and tRPC fetch all stay in the wrapping app.13 */14export function StatusPageHeader({15 className,16 ...props17}: React.ComponentProps<"header">) {18 return (19 <header20 data-slot="status-page-header"21 className={cn(className)}22 {...props}23 />24 );25}2627export function StatusPageHeaderContent({28 className,29 ...props30}: React.ComponentProps<"nav">) {31 return (32 <nav33 data-slot="status-page-header-content"34 className={cn(35 "mx-auto flex max-w-2xl items-center justify-between gap-3 px-3 py-2",36 className,37 )}38 {...props}39 />40 );41}4243/**44 * StatusPageHeaderBrand — left-side fixed-width slot. Pass the brand button45 * (with link target) as children.46 */47export function StatusPageHeaderBrand({48 className,49 ...props50}: React.ComponentProps<"div">) {51 return (52 <div53 data-slot="status-page-header-brand"54 className={cn("flex w-[150px] shrink-0", className)}55 {...props}56 />57 );58}5960/**61 * StatusPageHeaderBrandButton — outlined size-8 icon button that hosts the62 * brand link. Pass the actual link element as children via `asChild`.63 */64export function StatusPageHeaderBrandButton({65 className,66 ...props67}: React.ComponentProps<typeof Button>) {68 return (69 <Button70 data-slot="status-page-header-brand-button"71 variant="outline"72 size="icon"73 className={cn("size-8 overflow-hidden", className)}74 asChild75 {...props}76 />77 );78}7980/**81 * StatusPageHeaderBrandFallback — letter-from-title typography used when no82 * page icon is present. Renders the first character of up to two words,83 * uppercased.84 */85export function StatusPageHeaderBrandFallback({86 title,87 className,88 ...props89}: Omit<React.ComponentProps<"div">, "children"> & { title?: string }) {90 const initials =91 (title ?? "")92 .trim()93 .split(/\s+/)94 .filter(Boolean)95 .map((word) => word.charAt(0))96 .slice(0, 2)97 .join("")98 .toUpperCase() || "?";99 return (100 <div101 data-slot="status-page-header-brand-fallback"102 className={cn(103// … truncated
What it pulls in
Other registry items
Files it writes
More from openstatus
All 26 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Status Bannerstatus-banner | openstatus | Blocks | Free | no deps | |
| Status Barstatus-bar | openstatus | Blocks | Free | 1 dep | |
| Status Blank Statesstatus-blank | openstatus | Blocks | Free | no deps | |
| Status Calendarstatus-calendar | openstatus | Blocks | Free | 3 deps | |
| Status Page Chromestatus-chrome | openstatus | Blocks | Free | no deps | |
| Status Page (Complete)status-complete | openstatus | Blocks | Free | no deps | |
| Status Componentstatus-component | openstatus | Blocks | Free | 2 deps | |
| Status Component Groupstatus-component-group | openstatus | Blocks | Free | no deps |
