Skip to content

Marked Heading

A display heading with the marks an editor would make on it: a selection box with handles, a marker stroke, accent ink, a scribbled underline or a circle, plus a handwritten note with an arrow. The marks draw once when the heading scrolls into view, and the words stay plain for screen readers.

On this page
Used for
  • Landing heroes
  • Section headlines
  • Launch pages
  • Feature callouts
  • Pricing headers

Examples

Second mark
Note
Language

The marks

Vietnamese

Inside your own heading

A note on its own

Installation

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

Props

children
string | ReactNode
A string with marks written as [words]{select}, {highlight}, {accent}, {scribble} or {circle}; a bracket without a known mark stays as written, and \[ is a literal bracket. Or your own nodes with Mark.
as / size
ElementType / "md" | "lg" | "xl" | "2xl"
Default"h2" / none
The heading element, and Display heading's size scale (48 to 124px). Without a size the heading keeps the font size you give it.
note / noteCorner
ReactNode / "top-left" | "top-right" | "bottom-left" | "bottom-right"
Default - / "top-right"
A HandNote above (top) or below (bottom) the heading at that side, with an arrow into it.
reveal
"view" | "load" | "off"
Default"view"
view plays once when the heading scrolls into view after load (on screen at load, it rests); load plays once on first paint by CSS alone, for a hero; off never plays.
className / wrapperClassName
string
Classes for the heading, and for the wrapper that holds it and its note.
Mark
{ kind, children, order?, seed?, className? }
Defaultorder 0
One mark in your own nodes. order sets its place in the reveal (40ms apart, 4 steps at most); seed changes the hand-drawn stroke.
MarkedText
{ children, reveal?, className? }
Defaultreveal "view"
An inline run that plays marks the same way, for a heading you already have (a Hero title, a Display heading).
HandNote
{ children, corner?, className? }
Defaultcorner "top-right"
The note on its own, in the flow, with its arrow pointing toward the content.
--kn-mark / --kn-marker / --kn-hand-font
CSS
Default--primary / ink at 30% / system handwriting faces
The ink of every mark (these demos set a blue, since the docs accent is the text colour), the marker colour, and the note's face. The system faces are Segoe Print, Bradley Hand, Noteworthy and Chalkboard SE, then cursive; set --kn-hand-font to a face you host for Vietnamese or a set look.

Accessibility

  • Marks are decoration. Every stroke, box and handle is hidden from screen readers, and the heading reads as its plain words, without the bracket syntax.
  • Marks are spans, not the mark element, so screen readers do not announce a highlight in the middle of a headline.
  • The note is plain text outside the heading, so it does not change the heading's name; its arrow is hidden.
  • Under reduced motion every mark shows in its final state and nothing draws.
  • Accent and marker colours sit behind or on the text in the accent; keep the headline readable without them.

What it handles

  1. 01Marks words in a heading the way an editor marks a draft: a selection box with four handles, a marker stroke, accent ink, a scribbled underline or a circle.
  2. 02Takes the marks inline in a plain string, [every window]{select}, or as Mark nodes inside your own heading, a Display heading or a Hero title.
  3. 03Draws every stroke by hand from a seed in the words, so the server and the browser agree and two marks never look stamped.
  4. 04Adds a short handwritten-style note at any corner, with a curved arrow drawn into the heading, in the flow so it never covers the copy.
  5. 05Plays once when the heading scrolls into view: the box fades in and its handles pop, strokes draw left to right, the arrow comes last.
  6. 06Keeps the heading's words plain for screen readers; every mark is decoration.

States

First render
Marks drawn, at rest
none
Scrolls into view after load
Box fades in, then handles pop; strokes draw left to right; marks 40ms apart; then the note and its arrow
180ms and 120ms ease out; strokes 280ms ease out
reveal="load"
The same, once, on first paint (CSS only)
as above
Reduced motion
Final state
0ms

Works with

When to use

When to use

  • A landing hero or section headline where one or two words carry the point, marked the way an editor marks a draft.
  • A launch page that wants one hand-made moment: a handwritten note with an arrow beside the headline.

When not to use

  • Logos in place of words: use Heading Mark.
  • Running text and product UI: marks are for display headings, one or two per page.
  • A plain headline with one accent word or a coloured full stop: use Display Heading.

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 Marked Heading to my app and wire it to my own data.
  • I need a landing hero or section headline where one or two words carry the point, marked the way an editor marks a draft. Set that up with the Knowns UI Marked Heading.
  • Which Marked Heading props do I need for a minimal setup? Show me a short example.

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

Need help?

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