BankaiHeading
A native <h1>–<h6> chosen by a required level. The element itself carries the document-outline semantics that assistive tech navigates by, so the level is always an explicit, deliberate choice — never a default.
The type scale
Each level maps to a size step the theme paints (keyed on data-bankai-level). Headings ship margin: 0 — spacing is the layout's job (BankaiFlex / BankaiStack gap).
Heading level 1
Heading level 2
Heading level 3
Heading level 4
Heading level 5
Heading level 6
Level is required — and it means the outline
There is no universally-safe default heading level, and a wrong one silently breaks the document outline screen-reader users navigate by — so level has no default and must be stated. Pick it by the heading's place in the page hierarchy (don't skip levels), not by how big you want it to look.
Decoupling the visual size from the semantic level (an <h2> styled like an <h1>, the proper fix for wanting a size without skipping a level) is planned as a future size prop; today the visual size tracks the level.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
level | 1 | 2 | 3 | 4 | 5 | 6 | — | Heading level 1–6 → renders the native <h1>–<h6> and reflects data-bankai-level. Required — there is no safe default heading level, and a wrong one breaks the document outline assistive tech navigates by, so the level is always an explicit, deliberate choice. |
Emits
This component emits no events.
Slots
| Slot | Description |
|---|---|
default | Heading content. |
Exposes
This component exposes nothing on its instance.
Theming
Every token is a :root custom property applied through zero-specificity :where() rules, so a single plain declaration overrides one — no selector, no !important. Set it globally on :root or locally on any ancestor.
| Token | Default | Purpose |
|---|---|---|
--bankai-heading-color | var(--bankai-color-fg) | Heading text color. |
--bankai-heading-font-weight | 600 | Shared font weight across all levels. |
--bankai-heading-size-1 | 2.25rem | Font size of level 1. |
--bankai-heading-line-height-1 | 2.5rem | Line height of level 1. |
--bankai-heading-size-2 | 1.875rem | Font size of level 2. |
--bankai-heading-line-height-2 | 2.25rem | Line height of level 2. |
--bankai-heading-size-3 | 1.5rem | Font size of level 3. |
--bankai-heading-line-height-3 | 2rem | Line height of level 3. |
--bankai-heading-size-4 | 1.25rem | Font size of level 4. |
--bankai-heading-line-height-4 | 1.75rem | Line height of level 4. |
--bankai-heading-size-5 | 1.125rem | Font size of level 5. |
--bankai-heading-line-height-5 | 1.75rem | Line height of level 5. |
--bankai-heading-size-6 | 1rem | Font size of level 6. |
--bankai-heading-line-height-6 | 1.5rem | Line height of level 6. |