Highlight Headline 1
Classic yellow-highlighter sales headline. A red pre-head calls out the reader, a heavy headline carries one marker swipe on the key phrase, and a blue sub-head makes the promise clear.
Use it in a prompt
Use content/highlight-headline from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/content/highlight-headline.tsx. - Import it and pass your copy and images (Props tab):
import { HighlightHeadline } from "@/components/funneldna/content/highlight-headline"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/highlight-headline/component.tsx 237 lines
// layout: scroll-panels
// Classic yellow-highlighter sales headline. A red pre-head calls out the reader, a heavy headline carries one marker swipe on the key phrase, and a blue sub-head makes the promise clear.
import * as React from "react"
export type HighlightHeadlineProps = {
/** Red line above the headline: who this is for, or the hook. */
preHead?: React.ReactNode
/** The promise. Plain text so the highlighted phrase can be found inside it. */
headline?: string
/** Phrase inside `headline` that gets the marker swipe. Omit it, or let it not match, for no highlight. */
highlight?: string
/** Blue sub-head under the headline. */
subhead?: React.ReactNode
/** Wrap the headline in classic quote marks. */
quoted?: boolean
/** Opening quote glyph, used when `quoted` is on. */
openQuote?: string
/** Closing quote glyph, used when `quoted` is on. */
closeQuote?: string
align?: "center" | "left"
/** "hero" for the page's first screen, "section" for a headline further down the page. */
size?: "hero" | "section"
/** Heading level of the headline. */
as?: "h1" | "h2" | "h3"
/** Swipe the marker in once on load. The text is always visible; reduced motion shows the finished stroke. */
animate?: boolean
/** id on the headline element, for aria-labelledby on the section around it. */
id?: string
className?: string
}
export function HighlightHeadline({
preHead = "Attention first-time funnel builders:",
headline = "Build your first funnel with a clear plan",
highlight = "a clear plan",
subhead = "Plan your funnel, write your page copy, and check every step before you launch.",
quoted = true,
openQuote = "\u201c",
closeQuote = "\u201d",
align = "center",
size = "hero",
as = "h1",
animate = true,
id,
className,
}: HighlightHeadlineProps) {
const Tag = as
const at = highlight ? headline.indexOf(highlight) : -1
const body =
!highlight || at < 0 ? (
headline
) : (
<>
{headline.slice(0, at)}
<mark className="cf-hh__mark">{highlight}</mark>
{headline.slice(at + highlight.length)}
</>
)
const rootClass = [
"cf-highlight-headline",
`is-${align}`,
`is-${size}`,
animate ? "is-animated" : "",
className ?? "",
]
.filter(Boolean)
.join(" ")
return (
<div className={rootClass}>
<style>{CSS}</style>
{preHead ? <p className="cf-hh__pre">{preHead}</p> : null}
<Tag id={id} className="cf-hh__headline">
{quoted ? openQuote : null}
{body}
{quoted ? closeQuote : null}
</Tag>
{subhead ? <p className="cf-hh__sub">{subhead}</p> : null}
</div>
)
}
export default HighlightHeadline
/*
Theme adherence (2026-11-21): audited against theme-contract.md; no colour or font changes needed.
Colour notes:
- Pre-head: the page's action hue pulled toward the ink in oklab, so it stays red (or the page's own action hue)
and gains contrast on light and dark themes alike. Override with --prehead-ink.
- Sub-head: the text-safe --accent (blue by default). Override with --subhead-ink.
- Marker: the theme's --marker (yellow highlighter by default), read on the mark itself and kept light and
near-solid so the phrase always reads; the phrase ink is the page ink held dark, so it stays readable on the
marker under dark themes too. #fae37c is the documented yellow-marker default (theme-contract §3).
*/
const CSS = `
.cf-highlight-headline {
--hh-pre-ink: var(--prehead-ink, color-mix(in oklab, var(--cta) 66%, var(--ink)));
--hh-sub-ink: var(--subhead-ink, var(--accent));
--hh-mark-ink: oklch(from var(--ink) min(l, 0.24) c h);
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
max-width: 60rem;
margin-inline: auto;
text-align: center;
color: var(--ink);
font-family: var(--font-body);
}
.cf-highlight-headline *,
.cf-highlight-headline *::before,
.cf-highlight-headline *::after { box-sizing: border-box; }
.cf-highlight-headline.is-left {
align-items: flex-start;
text-align: left;
margin-inline: 0;
}
.cf-highlight-headline .cf-hh__pre {
margin: 0 0 16px;
max-width: 46rem;
color: var(--hh-pre-ink);
font-family: var(--font-display);
font-weight: 800;
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.25;
letter-spacing: -0.005em;
text-wrap: balance;
}
.cf-highlight-headline.is-section .cf-hh__pre {
margin-bottom: 12px;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.3;
}
.cf-highlight-headline .cf-hh__headline {
margin: 0;
max-width: 100%;
color: var(--ink);
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
font-size: clamp(2.5rem, 5.4vw, 4.875rem);
line-height: 1.04;
text-wrap: balance;
overflow-wrap: break-word;
}
.cf-highlight-headline.is-section .cf-hh__headline {
font-size: clamp(2rem, 3.6vw, 3.25rem);
line-height: 1.06;
}
.cf-highlight-headline .cf-hh__mark {
--hh-marker: oklch(from var(--marker, #fae37c) max(l, 0.86) c h / 0.94);
color: var(--hh-mark-ink);
text-decoration: none;
text-shadow: none;
background-color: transparent;
background-image: linear-gradient(
transparent 14%,
var(--hh-marker) 14%,
var(--hh-marker) 96%,
transparent 96%
);
background-repeat: no-repeat;
background-position: 0 0;
background-size: 100% 100%;
padding: 0 0.12em;
margin: 0 -0.04em;
border-radius: 0.24em 0.1em 0.3em 0.08em / 0.42em 0.22em 0.46em 0.26em;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
@media (forced-colors: active) {
.cf-highlight-headline .cf-hh__mark {
forced-color-adjust: none;
background: Mark;
color: MarkText;
}
}
@media print {
.cf-highlight-headline .cf-hh__mark {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}
.cf-highlight-headline .cf-hh__sub {
margin: clamp(16px, 1.6vw, 24px) 0 0;
max-width: 46rem;
color: var(--hh-sub-ink);
font-family: var(--font-body);
font-weight: 500;
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.35;
text-wrap: pretty;
}
.cf-highlight-headline.is-section .cf-hh__sub {
margin-top: 14px;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
}
.cf-highlight-headline .cf-hh__pre strong,
.cf-highlight-headline .cf-hh__sub strong { font-weight: 800; }
@keyframes cf-hh-rise {
from { opacity: 0.82; transform: translateY(8px); }
to { opacity: 1; transform: none; }
}
@keyframes cf-hh-swipe {
from { background-size: 0% 100%; color: var(--ink); }
to { background-size: 100% 100%; color: var(--hh-mark-ink); }
}
.cf-highlight-headline.is-animated .cf-hh__pre,
.cf-highlight-headline.is-animated .cf-hh__headline,
.cf-highlight-headline.is-animated .cf-hh__sub {
animation: cf-hh-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cf-highlight-headline.is-animated .cf-hh__headline { animation-delay: 0.07s; }
.cf-highlight-headline.is-animated .cf-hh__sub { animation-delay: 0.14s; }
.cf-highlight-headline.is-animated .cf-hh__mark {
animation: cf-hh-swipe 0.6s cubic-bezier(0.6, 0.1, 0.25, 1) 0.2s both;
}
@media (prefers-reduced-motion: reduce) {
.cf-highlight-headline.is-animated .cf-hh__pre,
.cf-highlight-headline.is-animated .cf-hh__headline,
.cf-highlight-headline.is-animated .cf-hh__sub,
.cf-highlight-headline.is-animated .cf-hh__mark {
animation: none;
}
.cf-highlight-headline .cf-hh__mark { background-size: 100% 100%; }
}
`
pieces/content/highlight-headline/specimen.tsx 22 lines
import * as React from "react"
import { HighlightHeadline } from "../highlight-headline"
import defaults from "../../studio-defaults.json"
export const states = ["default"] as const
export default function HighlightHeadlineSpecimen(_props: { state?: (typeof states)[number] }) {
const sample = defaults.sample
return (
<HighlightHeadline
preHead="Attention first-time funnel builders:"
headline={sample.headline}
highlight="a clear plan"
subhead={
<>
<strong>{sample.name}</strong> shows you how to plan your funnel, write your page copy, and check every
step before you launch.
</>
}
/>
)
}
| Name | Type | Details |
|---|---|---|
preHead OptionalHighlightHeadline |
React.ReactNode |
Default "Attention first-time funnel builders:"
|
headline OptionalHighlightHeadline |
string |
Default "Build your first funnel with a clear plan"
|
highlight OptionalHighlightHeadline |
string |
Default "a clear plan"
|
subhead OptionalHighlightHeadline |
React.ReactNode |
Default "Plan your funnel, write your page copy, and check every step before you launch."
|
quoted OptionalHighlightHeadline |
boolean |
Default true
|
openQuote OptionalHighlightHeadline |
string |
Default "\u201c"
|
closeQuote OptionalHighlightHeadline |
string |
Default "\u201d"
|
align OptionalHighlightHeadline |
"center" | "left" |
Default "center"
|
size OptionalHighlightHeadline |
"hero" | "section" |
Default "hero"
|
as OptionalHighlightHeadline |
"h1" | "h2" | "h3" |
Default "h1"
|
animate OptionalHighlightHeadline |
boolean |
Default true
|
id OptionalHighlightHeadline |
string |
|
className OptionalHighlightHeadline |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB