Compose flexible page headers with banner images, logos, avatars, titles, and action buttons. Perfect for profile pages, blog posts, documentation pages, and any page that needs a prominent header.
Built with compound components for maximum flexibility—mix and match Banner, Media, Content, Meta, Title, Description, Actions, and Tabs to create any page header layout.
Installation
shellUsage
tsxAnatomy
PageHeader is a compound component with these parts:
tsxProps
PageHeader.Root
Layout container for page header content. Extends Kookie UI's Flex component.
All other Flex props from Kookie UI are supported.
PageHeader.Banner
Full-width banner image at the top of the header.
All other Box props from Kookie UI are supported.
PageHeader.Main
Inline row containing media, content, and actions. Groups the main header elements.
All other Flex props from Kookie UI are supported.
PageHeader.Media
Logo or avatar image. Uses Kookie UI's Avatar component internally.
All other Avatar props from Kookie UI are supported (except radius, which is controlled by type).
PageHeader.Content
Container for meta, title, and description. Groups them on the left side.
All other Flex props from Kookie UI are supported.
PageHeader.Meta
Container for meta information like category, date, author, etc. Position is controlled by render order—place before or after Title.
All other Flex props from Kookie UI are supported.
PageHeader.Title
Page heading. Extends Kookie UI's Heading component with page-level defaults.
All other Heading props from Kookie UI are supported.
PageHeader.Description
Supporting text. Extends Kookie UI's Text component.
All other Text props from Kookie UI are supported.
PageHeader.Actions
Container for action buttons. Positioned on the right in the Main row.
All other Flex props from Kookie UI are supported.
PageHeader.Tabs
Container for tabs. Renders below the Main row.
All Flex props from Kookie UI are supported.
Examples
Basic Page Header
Simple header with title, description, and actions:
tsxWith Logo
Header with company logo:
tsxWith Avatar
Header with user avatar:
tsxWith Banner and Avatar
Profile-style header with banner and overlapping avatar:
tsxWith Meta Below Title
Job posting style with meta information below the title:
tsxDocumentation Page
Header for documentation pages with category and tabs:
tsxMeta Position
The position of PageHeader.Meta is controlled by render order. Place it before or after PageHeader.Title based on your design:
tsxAvatar Overlap
The overlap prop on PageHeader.Media creates a profile-style layout where the avatar overlaps the banner:
tsxNotes:
- Only works when
type="avatar"(not"logo") - Requires a
PageHeader.Bannerto be present - A dev warning is shown if used incorrectly
Accessibility
PageHeader provides semantic HTML structure:
Semantic HTML
PageHeader.Titleuses<h1>by default (customizable withasprop)PageHeader.Bannerusesrole="img"witharia-labelfor background images- Maintain proper heading hierarchy in your page
Keyboard Navigation
- All interactive children (buttons, tabs) are keyboard accessible
- Standard tab navigation applies
Changelog
Added
- Initial release with compound component architecture
PageHeader.Root,PageHeader.Banner,PageHeader.Main,PageHeader.Media,PageHeader.Content,PageHeader.Meta,PageHeader.Title,PageHeader.Description,PageHeader.Actions,PageHeader.Tabscomponentstypeprop on Media for logo/avatar stylesoverlapprop on Media for profile-style layouts- Dev warnings for incorrect overlap usage