Skip to content
Application

Page Header

App page heading with title, description, an actions slot, and an optional breadcrumb.

Motionnone

Install

Install Kineto and follow the theme setup once in your app.

bash
npm install kineto
tsx
import { PageHeader } from "kineto/page-header";

Preview

Settings

Manage your account and workspace preferences.

tsx
import * as React from "react";

import { cn } from "@/lib/cn";

export interface PageHeaderProps
  extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
  title: React.ReactNode;
  description?: React.ReactNode;
  /** Trailing actions (e.g. Buttons). */
  actions?: React.ReactNode;
  /** Optional element rendered above the title (e.g. Breadcrumbs). */
  breadcrumb?: React.ReactNode;
}

const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(
  ({ className, title, description, actions, breadcrumb, ...props }, ref) => (
    <div
      ref={ref}
      className={cn("flex flex-col gap-4 border-b border-border pb-5", className)}
      {...props}
    >
      {breadcrumb}
      <div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
        <div className="min-w-0">
          <h1 className="font-display text-2xl font-semibold tracking-tight">
            {title}
          </h1>
          {description ? (
            <p className="mt-1 text-sm text-muted-foreground">{description}</p>
          ) : null}
        </div>
        {actions ? (
          <div className="flex shrink-0 items-center gap-2">{actions}</div>
        ) : null}
      </div>
    </div>
  )
);
PageHeader.displayName = "PageHeader";

export { PageHeader };

src/components/ui/page-header.tsx

Props

PropTypeDefaultDescription
title / descriptionReactNode—Heading content.
actionsReactNode—Trailing buttons.
breadcrumbReactNode—Rendered above the title.