Skip to main content

Layout

PaneHeader

The one header at the top of a pane (a chat, a folder's list, a calendar, a feed, a side pane): a title, the pane's own controls and its actions on one row, with the actions pinned to the end.

Calendar

Install

Hand it to your agent
Add PaneHeader from Ouro UI to this app. Read https://ui.ouroboros.bot/docs/pane-header.md first and follow it.

Or by hand. Once per app, with Tailwind CSS v4 and an @/* path alias (Ouro HX is built on Base UI, so --base base; skip -t in an existing app):

npx shadcn@latest init --base base --preset nova --yes --no-monorepo
npx shadcn@latest add ourostack/ouro-ui/ouro-base#v1.3.823

Then the component (Installing):

npx shadcn@latest add ourostack/ouro-ui/pane-header#v1.3.823
import { PaneHeader } from "@/components/ouro/pane-header/pane-header";

Paths use shadcn's default @/ alias; the CLI rewrites them to yours.

Example

<PaneHeader title={<Heading level={2}>Calendar</Heading>} controls={<Button variant="plain">Today</Button>} actions={<Button>New event</Button>} />

Use instead when

  • Use PageHeader instead for the top of a whole page, ChatHeader for an open chat's people, and Toolbar for a row of controls with no title.

Props

Type: PaneHeaderProps.

actions
Type: ReactNode
What a person does here, such as a call or a menu button, pinned to the end.
children
Type: ReactNode
More in the row, after the controls and before the actions.
className
Type: string
Layout only: margins, padding, width (px-4 py-2). Appearance classes warn in development.
controls
Type: ReactNode
The pane's own controls, such as a filter or a view switch, after the title.
ref
Type: Ref<HTMLElement>
Reaches the rendered element.
title
Type: ReactNode
What the pane is: its name, at the start.

Native attributes

Also accepts the attributes in React's HTMLAttributes (id, aria-*, event handlers), passed to the rendered element, except those named on this page.

Don't use

These are not props. Passing one fails the type check with the fix in the error, and in development a console message names the fix.

  • action: Not a prop. The buttons at the end are actions: <PaneHeader actions={<Button>New</Button>} />.
  • heading: Not a prop. The pane's name is title: <PaneHeader title="Calendar" />.

className is for layout only

Pass margins, width and grid placement (mt-4, w-full, col-span-2).

Appearance comes from props, not classes. In development, a class that sets appearance logs one warning per component instance, naming the prop to use instead. A class sets appearance when, after its variants (hover:, sm:) and any ! are removed, it starts with bg-, text-, border-, rounded-, shadow-, font-, ring-, from-, via-, to-, fill- or stroke-, or is border, rounded, shadow or ring, or has a dark: variant. Text wrapping, overflow and table layout classes (text-wrap, text-ellipsis, border-collapse) are layout and do not warn.

Alignment classes (text-center) warn too: set alignment on a parent element.