Heading
A semantic heading component with auto-sizing, accent colors, and tracking control. Renders h1–h6 based on the level prop with appropriate sizing.
Live Sandbox
This is a hydrated playground for the component. Toggle "Live preview" on the block below to swap the static HTML render for a real Livewire instance — every prop in the component's sandbox schema becomes an editable form field inside the iframe, so you can try different prop combinations live without writing any local code.
Section title
Basic Usage
Heading 1 (2xl)
Heading 2 (xl)
Heading 3 (lg)
Heading 4 (base)
Heading 5 (sm)
Explicit Sizing
Override the auto-size with the size prop.
Large heading 2
Small heading 3
Accent Color
Use the accent prop to apply the primary theme color.
Accent Heading
Accent Subheading
Tracking
Control letter spacing with the tracking prop.
Tight Tracking
Long Names
A heading often carries a name somebody chose, such as a template, a repository or a channel, and a name like that may have no space or hyphen to wrap at. It then runs out of its heading, and on a phone the whole page slides sideways. Set break="anywhere" and the name wraps only where the line would otherwise overflow, so ordinary titles still wrap between words.
Template
release_announcement_with_highlights_contributors_and_upgrade_notes
The prop takes the same three values as on text, with the same meaning: anywhere breaks only where a line would overflow, all between any two characters, and normal restores the browser's default rules.
Fitting the Line
A heading that breaks after its first word on a phone can shrink instead, down to a floor, with fit. It then takes the fewest lines the floor needs, at the largest size that keeps them. fit alone uses the --text-wk-fit-floor token, three quarters of the heading's size, and a length such as fit="0.6em" sets a floor of its own. How the fitting works and what it costs is on the Fit Text page.
Your order is on its way
Your order is on its way
Page Layout Example
Welcome to WireKit
A component library for Laravel Livewire.
Auto-Sizing
When size is not provided, the heading auto-sizes based on level:
| Level | Auto Size |
|---|---|
| 1 | 2xl |
| 2 | xl |
| 3 | lg |
| 4 | base |
| 5, 6 | sm |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
level |
int|null | null |
Heading level 1–6 (renders h1–h6). Defaults to 2 |
size |
string|null | null |
Font size: sm, md, base, lg, xl, 2xl, 3xl, 4xl, 5xl. Auto-sized from level when null |
accent |
bool | false |
Use primary color |
tracking |
string | 'normal' |
Letter spacing: normal, tight, tighter |
break |
string|null | null |
Where an unbroken name may wrap: anywhere only where the line would overflow, all between any two characters, normal the browser default. The same values as on text |
fit |
bool|string|null | null |
Shrinks the heading down to a floor so it takes the fewest lines the floor needs: true for the --text-wk-fit-floor token, or a length such as 0.75em. See Fitting the Line |
as |
string|null | null |
Override element (defaults to h1–h6 based on level) |
scope |
string|null | null |
Scoped personalization name |
Keyboard Interaction
This component is purely presentational and does not respond to keyboard input.
Design Tokens
| Token | Used for |
|---|---|
--font-wk-sans |
Font family |
--font-wk-heading-weight |
Font weight |
--font-wk-heading-line-height |
Line height (fallback: 1.25) |
--text-wk-sm through --text-wk-3xl |
Font sizes |
--color-wk-text |
Default color |
--color-wk-accent-text |
Accent color |
--text-wk-fit-floor |
The floor of a heading with fit and no floor of its own, 0.75em |