Skip to main content

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} and size="xl".
  • level follows the outline, size the look – the two are separate.
  • At most two actions on the right.

Props​

PropTypeDefaultMeaning
title *ReactNode–
actionReactNode–At the right: a link such as "Show all" or a small button.
classNamestring–
descriptionReactNode–A sentence below the title.
idstring–
level1 | 2 | 32The 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.