PageHeader
Shared ComponentsReusable page header with title, description, breadcrumbs, and action slot.
Responsive viewport — resize the window to explore. Direction and density apply only to this preview. Theme applies to the docs too.
"use client";
import { PageHeader } from "@dashboardpack/core/components/shared/page-header";
import { Button } from "@dashboardpack/core/components/ui/button";
import { useState } from "react";
export default function PageHeaderExample() {
const [count, setCount] = useState(0);
return (
<div className="w-full space-y-3">
<PageHeader
title="Projects"
description="Manage your team’s active work."
breadcrumbs={[
{ label: "Workspace", href: "/docs/components" },
{ label: "Projects" },
]}
>
<Button onClick={() => setCount(count + 1)}>New project</Button>
</PageHeader>
<p className="text-xs text-muted-foreground" role="status">
{count} projects created in this preview.
</p>
</div>
);
}Usage
Provide a page title and optional description, breadcrumbs, and action children. It stacks on small screens and places actions beside the title on larger screens.
import { PageHeader } from "@dashboardpack/core/components/shared/page-header";Available in the included @dashboardpack/core package. Copy the complete example from Source code for all imports and state. Add "use client" when using hooks or event handlers. See installation and theming for project setup.
API reference
Common props and defaults. Slot-specific props are named below; native elements also accept their standard HTML attributes. The component TypeScript definitions are the complete type reference.
| Prop | Type / Default | Description |
|---|---|---|
| title | stringDefault: required | Main h1 heading. |
| description | stringDefault: — | Supporting page context. |
| breadcrumbs | { label: string; href?: string }[]Default: — | Last item is the current page. |
| children | ReactNodeDefault: — | Primary and secondary page actions. |