Skip to content

Display Heading

A display headline at 72 to 96px with tight tracking, and one accent device: a marker highlight, one coloured word, or a coloured full stop. The intro layout puts the headline on the left and a short paragraph with the buttons on the right, stacked on a phone.

On this page
Used for
  • Landing page hero headline
  • Headline with a marker highlight
  • Headline with one coloured word
  • Headline with a coloured full stop
  • Asymmetric intro row

Examples

Accent
Size

Installation

npx knowns-ui@latest add display-heading
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

DisplayHeading children
string
The headline. Two short lines.
accent
"marker" | "word" | "stop" | "none"
Default"none"
Marker: a highlighter band behind the word. Word: the word in the accent colour. Stop: the closing full stop in the accent colour. Pick one per page.
highlight
string
The word the marker or the colour goes on, the first match, case sensitive.
size
"md" | "lg" | "xl"
Default"lg"
Tops out at 72, 88 or 96px. 44 to 52px on a phone.
as
ElementType
Default"h1"
The heading element.
DisplayIntro lead
ReactNode
The paragraph on the right, 15 to 16px, muted.
DisplayIntro actions
ReactNode
Buttons under the paragraph.
DisplayIntro eyebrow
ReactNode
A small line above the headline.

The font follows the --kn-display-font variable when a page sets it, such as a serif stack, and inherits otherwise. The accent colour is the theme primary, so a page that paints its own palette recolours the device with it.

What it handles

  1. 01Sets a headline at up to 72, 88 or 96px with tight tracking, and 44 to 52px on a phone.
  2. 02Marks one word with a highlighter band, or colours it, or ends the headline with a coloured full stop; the accent is the theme primary.
  3. 03Puts the headline left and a short paragraph with the buttons right from 1024px, bottom aligned, and stacks them on a phone.
  4. 04Takes the page's display font from the --kn-display-font variable and inherits it otherwise.
  5. 05Renders any heading level through the as prop, h1 by default.
  6. 06Keeps the accent maths in a utils file with tests.

States

First render
Nothing plays. It is type only
none
Narrow screen
The paragraph and buttons stack under the headline
none
Right to left
The intro columns swap sides and the marker follows the text
none

Works with

When to use

When to use

  • The hero headline of a landing page at 72 to 96px, with the paragraph and buttons beside it.
  • A section headline that carries the page's one accent device.

When not to use

  • A heading inside a product screen: use Page Header.
  • A full hero with media: use Hero.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Display Heading to my app and wire it to my own data.
  • I need the hero headline of a landing page at 72 to 96px, with the paragraph and buttons beside it. Set that up with the Knowns UI Display Heading.
  • Which Display Heading props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "display-heading" }) and search_docs({ query: "display heading" }).

Need help?

Stuck on Display Heading, or found something off? We read every message.