Skip to content
Product block

Page Header With Tabs

Breadcrumb, title, action buttons and a counted tab row that sits flush with the bottom rule.

150 lineslucide-reactAdded 8 Aug 2026Updated 10 Sept 2026
  • header
  • breadcrumb
  • tabs
  • toolbar
  • dashboard

What's included

  • components/dashboard-page-header.tsx
  • Needs lucide-react

Works with

  • React
  • Next.js
  • Tailwind CSS
  • TypeScript

npx hoverlab add dashboard-page-header

Or over MCP, from your editor's agent — no account needed.

License

Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.

Was this useful?

Start a page with this section — add more, order them, and leave with the page source.

Preview

Customers

Everyone who has ever signed up, and where they stand today.

Rendered live in your current theme — this is the same component whose source is below, not a screenshot of it.

Source

components/dashboard-page-header.tsx
/**
 * <DashboardPageHeader> — title, breadcrumb, tabs and page actions.
 *
 * The strip that sits above every inner page of an admin tool. Worth having
 * as one block because the alignment is fiddly: the title and the action
 * buttons share a baseline on wide screens and must stack cleanly on
 * narrow ones, and the tab row has to sit flush with the bottom border so
 * the active indicator lands on the rule rather than floating above it.
 *
 * The active tab uses `aria-current="page"`, not just a colour change.
 */

import * as React from 'react'
import { ChevronRight, Plus, Download } from 'lucide-react'

export interface Crumb {
  label: string
  href?: string
}

export interface HeaderTab {
  label: string
  href?: string
  count?: number
}

export interface DashboardPageHeaderProps {
  title?: string
  description?: string
  crumbs?: Crumb[]
  tabs?: HeaderTab[]
  activeTab?: string
  primaryAction?: { label: string; icon?: React.ReactNode }
  secondaryAction?: { label: string; icon?: React.ReactNode }
  className?: string
}

const DEFAULT_CRUMBS: Crumb[] = [
  { label: 'Dashboard', href: '#' },
  { label: 'Customers' },
]

const DEFAULT_TABS: HeaderTab[] = [
  { label: 'All', count: 2847 },
  { label: 'Active', count: 2401 },
  { label: 'Trialing', count: 312 },
  { label: 'Churned', count: 134 },
]

export function DashboardPageHeader({
  title = 'Customers',
  description = 'Everyone who has ever signed up, and where they stand today.',
  crumbs = DEFAULT_CRUMBS,
  tabs = DEFAULT_TABS,
  activeTab = 'All',
  primaryAction = { label: 'Add customer', icon: <Plus className="h-4 w-4" /> },
  secondaryAction = { label: 'Export', icon: <Download className="h-4 w-4" /> },
  className = '',
}: DashboardPageHeaderProps) {
  return (
    <header className={`border-b border-border/60 ${className}`}>
      {crumbs.length > 0 ? (
        <nav aria-label="Breadcrumb">
          <ol className="flex flex-wrap items-center gap-1 text-sm text-muted-foreground">
            {crumbs.map((crumb, i) => {
              const last = i === crumbs.length - 1
              return (
                <li key={crumb.label} className="flex items-center gap-1">
                  {crumb.href && !last ? (
                    <a href={crumb.href} className="transition-colors hover:text-foreground">
                      {crumb.label}
                    </a>
                  ) : (
                    <span aria-current={last ? 'page' : undefined} className={last ? 'text-foreground' : ''}>
                      {crumb.label}
                    </span>
                  )}
                  {!last ? <ChevronRight aria-hidden className="h-3.5 w-3.5 rtl:rotate-180" /> : null}
                </li>
              )
            })}
          </ol>
        </nav>
      ) : null}

      <div className="mt-3 flex flex-col flex-wrap gap-4 sm:flex-row sm:items-start sm:justify-between">
        <div className="min-w-0">
          <h1 className="text-2xl font-bold tracking-tight">{title}</h1>
          {description ? (
            <p className="mt-1 text-sm text-muted-foreground">{description}</p>
          ) : null}
        </div>

        <div className="flex shrink-0 items-center gap-2">
          {secondaryAction ? (
            <button
              type="button"
              className="inline-flex items-center gap-2 rounded-xl border border-border/60 bg-background px-3.5 py-2 text-sm font-medium transition-colors hover:bg-muted"
            >
              {secondaryAction.icon}
              {secondaryAction.label}
            </button>
          ) : null}

          {primaryAction ? (
            <button
              type="button"
              className="inline-flex items-center gap-2 rounded-xl bg-primary px-3.5 py-2 text-sm font-semibold text-primary-foreground transition-colors hover:bg-primary/90"
            >
              {primaryAction.icon}
              {primaryAction.label}
            </button>
          ) : null}
        </div>
      </div>

      {tabs.length > 0 ? (
        <nav aria-label="Views" className="-mb-px mt-5 flex gap-1 overflow-x-auto">
          {tabs.map((tab) => {
            const active = tab.label === activeTab
            return (
              <a
                key={tab.label}
                href={tab.href ?? '#'}
                aria-current={active ? 'page' : undefined}
                className={`inline-flex shrink-0 items-center gap-2 border-b-2 px-3.5 py-2.5 text-sm font-medium transition-colors ${
                  active
                    ? 'border-primary text-foreground'
                    : 'border-transparent text-muted-foreground hover:border-border hover:text-foreground'
                }`}
              >
                {tab.label}
                {typeof tab.count === 'number' ? (
                  <span
                    className={`rounded-full px-1.5 py-0.5 text-xs ${
                      active ? 'bg-primary/15 text-primary' : 'bg-muted text-muted-foreground'
                    }`}
                  >
                    {tab.count.toLocaleString('en-US')}
                  </span>
                ) : null}
              </a>
            )
          })}
        </nav>
      ) : null}
    </header>
  )
}

Before you paste

  • Styling is Tailwind utility classes on semantic tokens (bg-card, text-muted-foreground) — it inherits your theme instead of overriding it.
  • Install: npm i lucide-react
  • Every prop has a default, so it renders standalone before you wire it up.

Where it goes

Drop it at components/dashboard-page-header.tsx and import it where you need the section:

import { DashboardPageHeader } from '@/components/dashboard-page-header'

Customize

3 of this block’s props are simple enough to drive from here. Change them and the block below re-renders — it is the same component whose source is above, not a mock of it. Everything else it accepts is in the table underneath.

Props

Read out of the component’s own type and signature, so this cannot drift from the source below. Every prop has a default — the component renders standalone before you pass it anything.

PropTypeDefault
titlestring'Customers'
descriptionstring'Everyone who has ever signed up, and where t…
crumbsCrumb[]DEFAULT_CRUMBS
tabsHeaderTab[]DEFAULT_TABS
activeTabstring'All'
primaryAction{ label: string; icon?: React.ReactNode }{ label: 'Add customer', icon: <Plus classNam…
secondaryAction{ label: string; icon?: React.ReactNode }{ label: 'Export', icon: <Download className=…
classNamestring''

Not using React?

The same block rendered once to markup, wrapped as a file your framework compiles. Tailwind classes are framework-agnostic, so the design transfers intact — the behaviour does not.

dashboard-page-header.html
<!--
  Page Header With Tabs — markup from the Hoverlab catalog.

  This is the block rendered once to HTML and wrapped as a component
  file. It is not a port of the React source: the Tailwind classes carry
  the design, which is the part that took the work, and they are the same
  in every framework.

  This block has no interactive behaviour, so nothing is missing.
-->
<header class="border-b border-border/60 ">
  <nav aria-label="Breadcrumb">
    <ol class="flex flex-wrap items-center gap-1 text-sm text-muted-foreground">
      <li class="flex items-center gap-1">
        <a href="#" class="transition-colors hover:text-foreground">Dashboard</a>
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right h-3.5 w-3.5 rtl:rotate-180" aria-hidden="true">
          <path d="m9 18 6-6-6-6"></path>
        </svg>
      </li>
      <li class="flex items-center gap-1">
        <span aria-current="page" class="text-foreground">Customers</span>
      </li>
    </ol>
  </nav>
  <div class="mt-3 flex flex-col flex-wrap gap-4 sm:flex-row sm:items-start sm:justify-between">
    <div class="min-w-0">
      <h1 class="text-2xl font-bold tracking-tight">Customers</h1>
      <p class="mt-1 text-sm text-muted-foreground">Everyone who has ever signed up, and where they stand today.</p>
    </div>
    <div class="flex shrink-0 items-center gap-2">
      <button type="button" class="inline-flex items-center gap-2 rounded-xl border border-border/60 bg-background px-3.5 py-2 text-sm font-medium transition-colors hover:bg-muted"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download h-4 w-4" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>Export</button>
      <button type="button" class="inline-flex items-center gap-2 rounded-xl bg-primary px-3.5 py-2 text-sm font-semibold text-primary-foreground transition-colors hover:bg-primary/90"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus h-4 w-4" aria-hidden="true"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg>Add customer</button>
    </div>
  </div>
  <nav aria-label="Views" class="-mb-px mt-5 flex gap-1 overflow-x-auto">
    <a href="#" aria-current="page" class="inline-flex shrink-0 items-center gap-2 border-b-2 px-3.5 py-2.5 text-sm font-medium transition-colors border-primary text-foreground">All<span class="rounded-full px-1.5 py-0.5 text-xs bg-primary/15 text-primary">2,847</span></a>
    <a href="#" class="inline-flex shrink-0 items-center gap-2 border-b-2 px-3.5 py-2.5 text-sm font-medium transition-colors border-transparent text-muted-foreground hover:border-border hover:text-foreground">Active<span class="rounded-full px-1.5 py-0.5 text-xs bg-muted text-muted-foreground">2,401</span></a>
    <a href="#" class="inline-flex shrink-0 items-center gap-2 border-b-2 px-3.5 py-2.5 text-sm font-medium transition-colors border-transparent text-muted-foreground hover:border-border hover:text-foreground">Trialing<span class="rounded-full px-1.5 py-0.5 text-xs bg-muted text-muted-foreground">312</span></a>
    <a href="#" class="inline-flex shrink-0 items-center gap-2 border-b-2 px-3.5 py-2.5 text-sm font-medium transition-colors border-transparent text-muted-foreground hover:border-border hover:text-foreground">Churned<span class="rounded-full px-1.5 py-0.5 text-xs bg-muted text-muted-foreground">134</span></a>
  </nav>
</header>
  • This is rendered HTML, not a translation of the React source. The Tailwind classes carry the design and work in any framework.
  • It is one frame: the component in its initial state, with no props applied beyond the defaults.
  • Requires Tailwind, and the design tokens the classes reference (bg-card, text-muted-foreground, and so on). The template ZIPs ship a globals.css that defines them.

What each framework gets across the whole catalog — effects convert properly; this rung is markup.

For AI

The component, its props, the design tokens it expects and the command that installs it — as one prompt. Paste it into Claude, Cursor, v0 or ChatGPT and what they build around it will match the rest of the catalog instead of inventing its own system.

See the prompt

Used in these pages

Want the whole screen instead of this one section? Open a page and copy it entire.

8 more blocks in Dashboards

All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.

Browse Dashboards

Shipping one commercially

Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.

  • A commercial licence for everything in the catalog
  • Unlimited bundle exports, in Vue, Svelte and Tailwind
  • One payment — no subscription, nothing to renew
Pro — $79 once

More Dashboards blocks

View category
Open the full page for this block

KPI Cards With Deltas

Metric row where each card knows whether a rise is good news, so churn going up is red while revenue going up is green.

Dashboards114 lines1 dep
Open the full page for this block

Activity Feed Panel

Recent-events list with typed icons and relative timestamps that keep the absolute value in a <time> element.

Dashboards171 lines1 dep
Open the full page for this block

Kanban Board Columns

Four columns of prioritised, tagged, assigned task cards with a blocked state — the board as a layout contract, leaving drag behaviour to your own state and library.

Dashboards203 lines1 dep
Open the full page for this block

Audit Log Timeline

Events grouped by day on a vertical rail, icons varying by type and one entry expanded into a detail card — what keeps forty events scannable instead of forty gray dots.

Dashboards204 lines1 dep
Open the full page for this block

Saved View Tabs

Saved views with the third state most implementations drop: a shared view with unsaved edits, where Save changes what a colleague sees tomorrow. Two honest buttons instead of one, ownership on the tab, and dirty said in words.

Dashboards306 lines1 dep
Open the full page for this block

Comparison Period Picker

A reporting window with the comparison window spelled out beside it — resolved dates, UTC arithmetic, and an option to align weekdays so a weekend is never compared against a Tuesday.

Dashboards315 lines1 dep
Open the full page for this block

Alert Rule List

Threshold alerts with the two facts most rule lists omit: how often each has fired, and whether its channel is muted — so a rule that is on but delivering nowhere reads as its own state.

Dashboards282 lines1 dep