Sections
Getting Started
Components
- DocTabs
- Callout
- ComponentPreview
- CommandMenu
- CopyButton
- DocsSidebar
- DocsTableOfContents
- PageHeader
- SiteHeader
- CopyCodeButton
- DocsCopyPage
- CodeBlockCommand
- CommandMenuItem
- CommandMenuKbd
- GitHubLink
- LucideIcon
- MainNav
- MobileNav
- ModeSwitcher
- PageHeaderDescription
- PageHeaderHeading
- SiteBody
- SiteConfig
- SiteFooter
- OgImage (Custom)
The PageHeader component provides a container for page hero sections with centered, responsive content layout.
Usage
<script setup lang="ts">
import { PageHeader } from '@/components/PageHeader'
import { PageHeaderHeading } from '@/components/PageHeaderHeading'
import { PageHeaderDescription } from '@/components/PageHeaderDescription'
</script>
<template>
<PageHeader>
<PageHeaderHeading>
Welcome to Our Documentation
</PageHeaderHeading>
<PageHeaderDescription>
Learn how to build amazing things with our tools and components.
</PageHeaderDescription>
</PageHeader>
</template>Examples
Basic Header
<template>
<PageHeader>
<PageHeaderHeading>Page Title</PageHeaderHeading>
<PageHeaderDescription>
A brief description of what this page covers.
</PageHeaderDescription>
</PageHeader>
</template>With Custom Content
You can add any content inside the PageHeader:
<template>
<PageHeader>
<PageHeaderHeading>Custom Header</PageHeaderHeading>
<PageHeaderDescription>
Description text here.
</PageHeaderDescription>
<Button>Get Started</Button>
</PageHeader>
</template>Related Components
PageHeaderHeading
The heading component for page titles:
<template>
<PageHeaderHeading>
Your Page Title
</PageHeaderHeading>
</template>Styling:
- Large, responsive font sizes (text-4xl on mobile, xl:text-5xl)
- Primary color text
- Font weight: semibold
- Text balance for better wrapping
PageHeaderDescription
The description component for subtitles:
<template>
<PageHeaderDescription>
Your page description goes here.
</PageHeaderDescription>
</template>Styling:
- Responsive text sizes (text-base on mobile, sm:text-lg)
- Muted foreground color
- Text balance
- Max width constraint
API Reference
PageHeader
| Prop | Type | Default | Description |
|---|---|---|---|
class | HTMLAttributes["class"] | undefined | Custom CSS classes |
PageHeaderHeading
| Prop | Type | Default | Description |
|---|---|---|---|
class | HTMLAttributes["class"] | undefined | Custom CSS classes |
PageHeaderDescription
| Prop | Type | Default | Description |
|---|---|---|---|
class | Custom CSS classes | undefined | Custom CSS classes |
Layout
The PageHeader component:
- Uses
container-wrapperfor responsive width - Centers content with flexbox
- Provides responsive padding (py-8 on mobile, md:py-16, lg:py-20)
- Adds gap spacing between children
- Includes border styling via
border-gridclass
Customization
You can customize the header by:
- Adding custom classes via the
classprop - Using Tailwind utilities for spacing and layout
- Overriding CSS variables for colors and spacing
- Adding additional child components