SectionHeader
import { SectionHeader } from "@study/ui"
Result
Loading...
Live Editor
<div className="ui-stack"> <SectionHeader level={1} size="xl" title="Good morning, Mira" description="Tuesday, 3 November" action={<Button variant="primary" icon="plus">New</Button>} /> <SectionHeader title="Your courses" size="lg" action={<LinkButton href="#" variant="ghost" size="sm">Show all</LinkButton>} /> </div>
Variants and states
Light
Page title
Section
with a description
Card title
Dark
Page title
Section
with a description
Card title
When to use
- Every page has exactly one title with
level={1}andsize="xl". levelfollows the outline,sizethe look – the two are separate.- At most two actions on the right.
Props
| Prop | Type | Default | Meaning |
|---|---|---|---|
title * | ReactNode | – | |
action | ReactNode | – | At the right: a link such as "Show all" or a small button. |
className | string | – | |
description | ReactNode | – | A sentence below the title. |
id | string | – | |
level | 1 | 2 | 3 | 2 | The heading level in the page's outline; the look stays the same. |
size | "md" | "lg" | "xl" | md |
Accessibility
- Real headings
h1–h3; screen readers jump through the page with them.