Skip to main content
  1. Docs
  2. Components
  3. Type

Heading

A section heading: the level sets the element, the size sets the look. The level is required, so the outline is always meant.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<h1>–<h6>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Import

heading.tsx
// From the package: a build keeps only what it uses.
import { Heading } from "@qeetrix/react";

// Or from its own path.
import { Heading } from "@qeetrix/react/heading";

02

Props

And every native attribute of the element it renders.

PropTypeDefaultWhat it does
level1 – 6requiredThe element: <h1> to <h6>.
size"display-lg" … "title-sm"by levelThe look: 1 heading-lg, 2 heading-md, 3 heading-sm, 4 title-lg, 5 title-md, 6 title-sm.
tone"default" | "subtle" | "inverse"—Its colour.
truncateboolean | number—One line with an ellipsis, or a number of lines.
align"start" | "center" | "end"—Logical alignment.
renderReactElement—Another element: a link that looks like a heading. Prefer level.

03

Parts

Each part carries a data-slot, for tests and placement.

data-slotElementWhat it is
heading<h2>h1–h6: data-size, data-tone.

04

Display sizes

For welcoming pages, in the Geo letterforms; a console's titles keep the title sizes.

welcome.tsx
<Heading level={1} size="display-lg">One philosophy, many products</Heading>
Next — HeadingAccessibility