Breaking News Hero 1
Stops the scroll with a breaking-news style announcement of the promise and one clear action.
Use it in a prompt
Use attention/breaking-news-hero 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/attention/breaking-news-hero.tsx. - Import it and pass your copy and images (Props tab):
import { BreakingNewsHero } from "@/components/funneldna/attention/breaking-news-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/attention/breaking-news-hero/component.tsx 367 lines
// Stops the scroll with a breaking-news style announcement of the promise and one clear action.
// layout: presenter-cutout
// Breaking-news hero: a news-desk pattern interrupt that types the promise like a teleprompter,
// lights up the one on-screen action, and runs the benefits past in a news-ticker marquee.
// Theme: every colour, face, button and shadow reads the theme-contract tokens. The "Breaking" flash uses the
// component-scoped --breaking-bg / --breaking-ink (falling back to --cta-2 / --cta-ink). The marker default
// (#fae37c) is the documented highlighter exception. The ticker's pause/play control is a small secondary
// button: it reads the --button-2-* role tokens and falls back to the band shades it was designed with.
// The ticker's edge fade is an alpha mask built from currentColor, so it carries no fixed colour.
// The presenter image is the presenter-cutout slot.
import * as React from "react"
import { MonitorPlay, Pause, Play } from "lucide-react"
export type BreakingNewsHeroProps = {
/** Flash label on the red half of the news tab. */
tabLabel?: string
/** What the story is, shown on the band half of the news tab. */
tag?: string
headline?: string
/** Phrase inside the headline that gets one marker stroke (case-insensitive match). */
highlight?: string
lead?: string
/** Button label, one line. */
label?: string
/** One short reassurance line under the button. */
sublabel?: string
/** Navigation destination for the button. */
href?: string
/** Called when the button is clicked; the builder wires what happens next. */
onAction?: (event: React.MouseEvent<HTMLElement>) => void
/** presenter-cutout slot: a person on a transparent background. */
presenterImage?: string
presenterAlt?: string
/** Big line of the lower-third under the presenter. */
lowerThirdTitle?: string
/** Small line of the lower-third. */
lowerThirdSubtitle?: string
/** Label at the start of the benefit ticker (also its accessible name). */
crawlLabel?: string
/** Benefit lines that scroll past in the news-ticker marquee. */
crawl?: string[]
/** Accessible label of the ticker's pause control. */
pauseLabel?: string
/** Accessible label of the ticker's play control. */
playLabel?: string
headingLevel?: "h1" | "h2"
disabled?: boolean
state?: "default" | "hover" | "active" | "disabled"
className?: string
}
const TYPE_START = 260
const SECONDS_PER_ITEM = 4.2
export function BreakingNewsHero(props: BreakingNewsHeroProps) {
const {
tabLabel = "Breaking",
tag = "Free on-demand workshop",
headline = "Map out your first funnel",
highlight = "first funnel",
lead = "Join the Funnel Starter Workshop and walk through your offer, page copy, and next steps.",
label = "Watch the full story",
sublabel = "Free workshop · Watch online",
href,
onAction,
presenterImage,
presenterAlt = "Workshop presenter",
lowerThirdTitle = "Funnel Starter Workshop",
lowerThirdSubtitle = "Your workshop presenter",
crawlLabel = "In this workshop",
crawl = ["Plan your funnel", "Write your page copy", "Check every step before you launch"],
pauseLabel = "Pause the ticker",
playLabel = "Play the ticker",
headingLevel = "h1",
disabled = false,
state = "default",
className,
} = props
const crawlId = React.useId()
const [paused, setPaused] = React.useState(false)
const isDisabled = disabled || state === "disabled"
const step = Math.max(18, Math.min(45, Math.round(1100 / Math.max(1, headline.length))))
const typeEnd = TYPE_START + headline.length * step
const Heading = headingLevel
// Each half of the track holds enough sets to outrun a wide screen; the track slides by exactly one half.
const setsPerHalf = Math.max(1, Math.ceil(5 / Math.max(1, crawl.length)))
const copies = setsPerHalf * 2
const marquee = `${(setsPerHalf * crawl.length * SECONDS_PER_ITEM).toFixed(1)}s`
const rootStyle = {
"--bnh-step": `${step}ms`,
"--bnh-end": `${typeEnd}ms`,
"--bnh-marquee": marquee,
} as React.CSSProperties
const dataState = state === "hover" || state === "active" ? state : undefined
const buttonContent = (
<>
<Play className="cf-bnh__icon" aria-hidden="true" />
<span className="cf-bnh__label">{label}</span>
<span className="cf-bnh__spacer" aria-hidden="true" />
</>
)
return (
<div className={["cf-bnh", className].filter(Boolean).join(" ")} style={rootStyle}>
<style>{CSS}</style>
<div className={presenterImage ? "cf-bnh__grid cf-bnh__grid--stage" : "cf-bnh__grid"}>
<div className="cf-bnh__copy">
<p className="cf-bnh__tab">
<span className="cf-bnh__tab-flash">
<span className="cf-bnh__dot" aria-hidden="true" />
{tabLabel}
</span>
{tag ? <span className="cf-bnh__tab-tag">{tag}</span> : null}
</p>
<Heading className="cf-bnh__h">
<span className="cf-bnh__sr">{headline}</span>
<span aria-hidden="true">{typeHeadline(headline, highlight, step)}</span>
</Heading>
{lead ? <p className="cf-bnh__lead">{lead}</p> : null}
<div className="cf-bnh__action">
{isDisabled ? (
<button type="button" className="cf-bnh__cta" disabled>
{buttonContent}
</button>
) : href ? (
<a className="cf-bnh__cta" href={href} data-state={dataState} onClick={onAction}>
{buttonContent}
</a>
) : (
<button type="button" className="cf-bnh__cta" data-state={dataState} onClick={onAction}>
{buttonContent}
</button>
)}
{sublabel ? (
<p className="cf-bnh__sub">
<MonitorPlay aria-hidden="true" />
{sublabel}
</p>
) : null}
</div>
</div>
{presenterImage ? (
<figure className="cf-bnh__stage">
<div className="cf-bnh__frame">
<div className="cf-bnh__screen" aria-hidden="true">
<svg viewBox="0 0 400 400" preserveAspectRatio="xMidYMax slice" fill="none" stroke="currentColor" strokeWidth={1.5}>
{[90, 150, 210, 270, 330, 390].map((r) => (
<circle key={r} cx={200} cy={420} r={r} />
))}
</svg>
</div>
<img className="cf-bnh__img" src={presenterImage} alt={presenterAlt} width={640} height={640} fetchPriority="high" />
</div>
<figcaption className="cf-bnh__lower">
<span className="cf-bnh__lower-name">{lowerThirdTitle}</span>
{lowerThirdSubtitle ? <span className="cf-bnh__lower-role">{lowerThirdSubtitle}</span> : null}
</figcaption>
</figure>
) : null}
</div>
{crawl.length ? (
<div className="cf-bnh__crawl">
<p className="cf-bnh__crawl-label" id={crawlId}>
<span className="cf-bnh__crawl-dot" aria-hidden="true" />
{crawlLabel}
</p>
<div className="cf-bnh__reel" data-paused={paused ? "" : undefined}>
<div className="cf-bnh__reel-window">
<div className="cf-bnh__track">
{Array.from({ length: copies }, (_, copy) => (
<ul
key={copy}
className="cf-bnh__crawl-list"
aria-labelledby={copy === 0 ? crawlId : undefined}
aria-hidden={copy === 0 ? undefined : true}
>
{crawl.map((item, i) => (
<li key={`${copy}-${i}`}>{item}</li>
))}
</ul>
))}
</div>
</div>
<button
type="button"
className="cf-bnh__reel-toggle"
aria-label={paused ? playLabel : pauseLabel}
aria-pressed={paused}
onClick={() => setPaused((p) => !p)}
>
{paused ? <Play aria-hidden="true" /> : <Pause aria-hidden="true" />}
</button>
</div>
</div>
) : null}
</div>
)
}
export default BreakingNewsHero
// Splits the headline into words and characters; each character lights up on its own delay (teleprompter),
// and the highlight phrase sits inside one marker span so the stroke wraps cleanly.
function typeHeadline(headline: string, highlight: string | undefined, step: number) {
const key = highlight ? highlight.trim() : ""
const at = key ? headline.toLowerCase().indexOf(key.toLowerCase()) : -1
const parts =
at < 0
? [{ text: headline, mark: false }]
: [
{ text: headline.slice(0, at), mark: false },
{ text: headline.slice(at, at + key.length), mark: true },
{ text: headline.slice(at + key.length), mark: false },
]
const last = headline.trimEnd().length - 1
let index = 0
return parts.map((part, p) => {
if (!part.text) return null
const nodes: React.ReactNode[] = []
part.text.split(" ").forEach((word, w) => {
if (w > 0) {
nodes.push(" ")
index += 1
}
if (!word) return
nodes.push(
<span className="cf-bnh__w" key={`w${w}`}>
{Array.from(word).map((ch) => {
const i = index
index += ch.length
return (
<span
key={i}
className={i === last ? "cf-bnh__c cf-bnh__c--last" : "cf-bnh__c"}
style={{ "--d": `${TYPE_START + i * step}ms` } as React.CSSProperties}
>
{ch}
</span>
)
})}
</span>
)
})
return part.mark ? (
<span className="cf-bnh__mark" key={p}>
{nodes}
</span>
) : (
<React.Fragment key={p}>{nodes}</React.Fragment>
)
})
}
const CSS = `
.cf-bnh{--bnh-break:var(--breaking-bg,var(--cta-2,oklch(0.506 0.206 29.5)));--bnh-break-ink:var(--breaking-ink,var(--cta-ink,#ffffff));--bnh-marker:var(--marker,#fae37c);--bnh-shadow:var(--shadow,oklch(0.22 0.03 260));--bnh-sh-sm:var(--shadow-sm,0 1px 1px oklch(from var(--bnh-shadow) l c h / .18),0 1px 3px oklch(from var(--bnh-shadow) l c h / .14));--bnh-sh-md:var(--shadow-md,0 1px 2px oklch(from var(--bnh-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--bnh-shadow) l c h / .2));--bnh-sh-lg:var(--shadow-lg,0 2px 4px oklch(from var(--bnh-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--bnh-shadow) l c h / .32));container:cf-bnh / inline-size;position:relative;min-width:0;color:var(--ink,#101828);font-family:var(--font-body,system-ui,sans-serif)}
.cf-bnh *,.cf-bnh *::before,.cf-bnh *::after{box-sizing:border-box}
.cf-bnh__sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-bnh__grid{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(2rem,1.2rem + 3cqi,3.5rem)}
.cf-bnh__copy{min-width:0;display:flex;flex-direction:column;align-items:flex-start;align-self:start}
.cf-bnh__tab{display:inline-flex;flex-wrap:wrap;max-width:100%;margin:0 0 clamp(1rem,.8rem + 1cqi,1.5rem);border-radius:calc(var(--radius,10px) * .6);overflow:hidden;box-shadow:var(--bnh-sh-sm);font-family:var(--font-display,system-ui,sans-serif);font-weight:800;font-size:clamp(.875rem,.78rem + .45cqi,1.0625rem);line-height:1.15;letter-spacing:.06em;text-transform:uppercase}
.cf-bnh__tab-flash{display:inline-flex;align-items:center;gap:.55rem;padding:.65rem 1rem;background:var(--bnh-break);color:var(--bnh-break-ink);text-shadow:var(--button-text-shadow,none);animation:cf-bnh-slide 420ms cubic-bezier(.2,.9,.25,1) both}
.cf-bnh__dot{flex:0 0 auto;width:.55em;height:.55em;border-radius:50%;background:currentColor;animation:cf-bnh-flash 360ms steps(1,end) 420ms 3}
.cf-bnh__tab-tag{display:inline-flex;align-items:center;padding:.65rem 1rem;background:var(--band,oklch(0.27 0.067 256));color:var(--band-ink,#ffffff);animation:cf-bnh-wipe 460ms cubic-bezier(.2,.9,.25,1) 140ms both}
.cf-bnh__h{margin:0;font-family:var(--font-display,system-ui,sans-serif);font-weight:var(--display-weight,900);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-.035em);font-size:clamp(2.75rem,1.2rem + 6cqi,5.25rem);line-height:1.02;color:var(--ink,#101828);text-wrap:balance}
.cf-bnh__w{white-space:nowrap}
.cf-bnh__c{position:relative;animation:cf-bnh-type 120ms ease-out var(--d,0ms) both}
.cf-bnh__c::after{content:"";position:absolute;top:.1em;bottom:.06em;right:-.06em;width:.07em;border-radius:1px;background:var(--bnh-break);opacity:0;pointer-events:none;animation:cf-bnh-caret var(--bnh-step,40ms) linear var(--d,0ms) forwards}
.cf-bnh__c--last::after{animation:cf-bnh-caret-end 1200ms linear var(--d,0ms) forwards}
.cf-bnh__mark{background-image:linear-gradient(var(--bnh-marker),var(--bnh-marker));background-repeat:no-repeat;background-position:0 88%;background-size:100% .44em;-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:.1em .22em .14em .2em;padding-inline:.06em;margin-inline:-.06em;color:var(--marker-ink,var(--ink,#101828));animation:cf-bnh-mark 460ms cubic-bezier(.3,.8,.3,1) var(--bnh-end,1200ms) both}
.cf-bnh__lead{margin:clamp(1rem,.6rem + 1.2cqi,1.5rem) 0 0;max-width:40ch;font-size:clamp(1.125rem,1rem + .7cqi,1.5rem);font-weight:500;line-height:1.45;color:var(--ink,#101828);text-wrap:pretty;animation:cf-bnh-rise 500ms cubic-bezier(.2,.8,.2,1) 200ms both}
.cf-bnh__action{display:inline-flex;flex-direction:column;align-items:center;gap:.75rem;max-width:100%;margin-top:clamp(1.5rem,1rem + 1.8cqi,2.25rem)}
.cf-bnh__cta{--b:var(--button-bg,var(--cta,oklch(0.576 0.209 29.5)));--b2:var(--button-bg-2,var(--cta-2,oklch(0.506 0.206 29.5)));position:relative;isolation:isolate;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;gap:.8rem;max-width:100%;min-height:4.25rem;padding:.8rem 1.9rem .8rem 1.5rem;border:1px solid oklch(from var(--b2) calc(l - 0.08) c h);border-radius:var(--button-radius,var(--radius,10px));background:linear-gradient(180deg,oklch(from var(--b) calc(l + 0.04) c h),var(--b2));color:var(--button-ink,var(--cta-ink,#ffffff));font-family:var(--button-font,var(--font-display,system-ui,sans-serif));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.25rem,1.05rem + .8cqi,1.75rem);line-height:1.1;letter-spacing:-.01em;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--b) calc(l + 0.14) c h / .7),inset 0 -3px 0 oklch(from var(--b) calc(l - 0.16) c h),var(--bnh-sh-md));transition:transform 160ms ease,background 160ms ease,box-shadow 160ms ease;animation:cf-bnh-pop 520ms cubic-bezier(.3,1.4,.5,1) var(--bnh-end,1200ms)}
.cf-bnh__cta::after{content:"";position:absolute;z-index:-1;top:-20%;bottom:-20%;left:0;width:40%;background:linear-gradient(90deg,transparent,oklch(from var(--b) calc(l + 0.2) c h / .6),transparent);transform:translateX(-140%) skewX(-18deg);pointer-events:none;animation:cf-bnh-sheen 900ms cubic-bezier(.3,.6,.3,1) calc(var(--bnh-end,1200ms) + 60ms) both}
.cf-bnh__icon{flex:0 0 auto;width:1.05em;height:1.05em;fill:currentColor;stroke-width:2;animation:cf-bnh-lamp 420ms ease-out var(--bnh-end,1200ms) both}
.cf-bnh__label{min-width:0;text-wrap:balance}
.cf-bnh__spacer{display:none}
.cf-bnh__cta:hover,.cf-bnh__cta[data-state=hover]{background:linear-gradient(180deg,oklch(from var(--b) calc(l + 0.08) c h),oklch(from var(--b2) calc(l + 0.03) c h));transform:translateY(-2px);box-shadow:inset 0 1px 0 oklch(from var(--b) calc(l + 0.16) c h / .75),inset 0 -3px 0 oklch(from var(--b) calc(l - 0.16) c h),var(--bnh-sh-lg)}
.cf-bnh__cta:active,.cf-bnh__cta[data-state=active]{background:linear-gradient(180deg,oklch(from var(--b2) calc(l - 0.02) c h),oklch(from var(--b2) calc(l - 0.06) c h));transform:translateY(1px);box-shadow:inset 0 2px 3px oklch(from var(--b) calc(l - 0.22) c h / .55),var(--bnh-sh-sm)}
.cf-bnh__cta:focus-visible{outline:3px solid var(--field-focus,var(--accent,oklch(0.5 0.17 257)));outline-offset:3px}
.cf-bnh__cta:disabled{background:var(--button-2-bg,var(--secondary,oklch(0.93 0.015 263)));color:var(--button-2-ink,var(--secondary-ink,#101828));border-color:var(--button-2-border,transparent);text-shadow:none;box-shadow:none;transform:none;cursor:not-allowed;animation:none}
.cf-bnh__cta:disabled::after{display:none}
.cf-bnh__cta:disabled .cf-bnh__icon{animation:none;opacity:.7}
.cf-bnh__sub{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;margin:0;color:var(--muted,#4a5565);font-size:.9375rem;font-weight:600;line-height:1.35;text-align:center;text-wrap:pretty}
.cf-bnh__sub svg{flex:0 0 auto;width:1.15em;height:1.15em;color:var(--accent,oklch(0.5 0.17 257))}
.cf-bnh__stage{position:relative;margin:0;min-width:0;width:100%;max-width:24rem;justify-self:center;display:flex;flex-direction:column;justify-content:flex-end;animation:cf-bnh-rise 560ms cubic-bezier(.2,.8,.2,1) 120ms both}
.cf-bnh__frame{position:relative}
.cf-bnh__screen{position:absolute;inset:18% 0 0;border:1px solid var(--card-border,color-mix(in oklch,var(--ink,#101828) 12%,transparent));border-bottom:0;border-radius:var(--card-radius,var(--radius,12px)) var(--card-radius,var(--radius,12px)) 0 0;overflow:hidden;background:color-mix(in oklch,var(--ink,#101828) 7%,var(--card,#ffffff));color:oklch(from var(--accent,oklch(0.5 0.17 257)) l c h / .2)}
.cf-bnh__screen svg{position:absolute;inset:0;width:100%;height:100%}
.cf-bnh__img{position:relative;z-index:1;display:block;width:100%;height:auto;aspect-ratio:1 / 1;object-fit:contain;object-position:50% 100%;filter:drop-shadow(0 2px 2px oklch(from var(--bnh-shadow) l c h / .28)) drop-shadow(0 10px 14px oklch(from var(--bnh-shadow) l c h / .18))}
.cf-bnh__lower{position:relative;z-index:2;display:flex;flex-direction:column;margin:0;border-radius:0 0 var(--card-radius,var(--radius,12px)) var(--card-radius,var(--radius,12px));overflow:hidden;box-shadow:var(--card-shadow,var(--bnh-sh-md))}
.cf-bnh__lower-name{display:block;padding:.8rem 1.1rem;background:var(--band,oklch(0.27 0.067 256));color:var(--band-ink,#ffffff);font-family:var(--font-display,system-ui,sans-serif);font-weight:800;font-size:clamp(1.125rem,.95rem + .8cqi,1.5rem);line-height:1.15;text-wrap:balance;animation:cf-bnh-wipe 480ms cubic-bezier(.2,.9,.25,1) 380ms both}
.cf-bnh__lower-role{display:block;padding:.55rem 1.1rem .65rem;background:var(--card,#ffffff);color:var(--ink,#101828);border:1px solid var(--card-border,color-mix(in oklch,var(--ink,#101828) 12%,transparent));border-top:0;border-radius:0 0 var(--card-radius,var(--radius,12px)) var(--card-radius,var(--radius,12px));font-size:1rem;font-weight:600;line-height:1.3;animation:cf-bnh-wipe 480ms cubic-bezier(.2,.9,.25,1) 520ms both}
.cf-bnh__crawl{display:grid;grid-template-columns:minmax(0,1fr);margin-top:clamp(1.75rem,1rem + 2.5cqi,3rem);border-radius:calc(var(--radius,10px) * .6);overflow:hidden;background:var(--band,oklch(0.27 0.067 256));color:var(--band-ink,#ffffff);box-shadow:var(--bnh-sh-sm)}
.cf-bnh__crawl-label{position:relative;z-index:1;display:flex;align-items:center;gap:.6rem;margin:0;padding:.7rem 1.1rem;background:oklch(from var(--band,oklch(0.27 0.067 256)) calc(l - 0.06) c h);font-family:var(--font-display,system-ui,sans-serif);font-weight:800;font-size:.875rem;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.cf-bnh__crawl-dot{flex:0 0 auto;width:.6em;height:.6em;border-radius:50%;background:var(--bnh-break);outline:2px solid oklch(from var(--band-ink,#ffffff) l c h / .85);outline-offset:0}
.cf-bnh__reel{position:relative;display:flex;align-items:center;min-width:0}
.cf-bnh__reel-window{flex:1 1 auto;min-width:0;overflow:hidden;padding:.95rem 0;-webkit-mask-image:linear-gradient(90deg,transparent,currentColor 2rem,currentColor calc(100% - 2.5rem),transparent);mask-image:linear-gradient(90deg,transparent,currentColor 2rem,currentColor calc(100% - 2.5rem),transparent);animation:cf-bnh-fade 700ms ease-out 520ms both}
.cf-bnh__track{display:flex;width:max-content;will-change:transform;animation:cf-bnh-marquee var(--bnh-marquee,24s) linear 700ms infinite}
.cf-bnh__reel-window:hover .cf-bnh__track,.cf-bnh__reel[data-paused] .cf-bnh__track{animation-play-state:paused}
.cf-bnh__crawl-list{display:flex;flex:0 0 auto;align-items:center;gap:2.5rem;margin:0;padding:0 2.5rem 0 0;list-style:none}
.cf-bnh__crawl-list li{display:flex;align-items:center;gap:.75rem;min-width:0;white-space:nowrap;font-family:var(--font-display,system-ui,sans-serif);font-weight:700;font-size:clamp(1rem,.92rem + .45cqi,1.1875rem);line-height:1.3}
.cf-bnh__crawl-list li::before{content:"";flex:0 0 auto;width:.42em;height:.42em;transform:rotate(45deg);background:oklch(from var(--band-ink,#ffffff) l c h / .6)}
.cf-bnh__reel-toggle{--bnh-toggle-bg:var(--button-2-bg,oklch(from var(--band,oklch(0.27 0.067 256)) calc(l - 0.06) c h));flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;margin:0 .75rem 0 .25rem;padding:0;border:1px solid var(--button-2-border,oklch(from var(--band-ink,#ffffff) l c h / .3));border-radius:50%;background:var(--bnh-toggle-bg);color:var(--button-2-ink,var(--band-ink,#ffffff));text-shadow:none;cursor:pointer;transition:background 160ms ease,border-color 160ms ease}
.cf-bnh__reel-toggle svg{width:.95rem;height:.95rem;fill:currentColor;stroke-width:2}
.cf-bnh__reel-toggle:hover{background:oklch(from var(--bnh-toggle-bg) calc(l + 0.06) c h);border-color:var(--button-2-border,oklch(from var(--band-ink,#ffffff) l c h / .55))}
.cf-bnh__reel-toggle:focus-visible{outline:2px solid var(--band-ink,#ffffff);outline-offset:2px}
@container cf-bnh (min-width: 760px){
.cf-bnh__grid--stage{grid-template-columns:minmax(0,1.3fr) minmax(0,.85fr);align-items:stretch}
.cf-bnh__copy{padding-top:.75rem}
.cf-bnh__stage{max-width:30rem;justify-self:end}
.cf-bnh__crawl{grid-template-columns:auto minmax(0,1fr)}
.cf-bnh__crawl-label{padding-inline:1.25rem}
}
@container cf-bnh (max-width: 519px){
.cf-bnh__action{align-self:stretch;width:100%}
.cf-bnh__cta{display:grid;grid-template-columns:1.05em minmax(0,1fr) 1.05em;width:100%;padding:.85rem 1rem}
.cf-bnh__spacer{display:block}
.cf-bnh__label{text-align:center}
.cf-bnh__stage{max-width:21rem}
.cf-bnh__crawl-list{gap:2rem;padding-right:2rem}
.cf-bnh__reel-toggle{margin-right:.6rem}
}
@keyframes cf-bnh-slide{from{opacity:0;transform:translateX(-1.25rem)}to{opacity:1;transform:none}}
@keyframes cf-bnh-wipe{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
@keyframes cf-bnh-flash{0%{opacity:1}50%{opacity:.25}}
@keyframes cf-bnh-type{from{opacity:.24}to{opacity:1}}
@keyframes cf-bnh-caret{0%,99%{opacity:1}100%{opacity:0}}
@keyframes cf-bnh-caret-end{0%,24%{opacity:1}25%,49%{opacity:0}50%,74%{opacity:1}75%,100%{opacity:0}}
@keyframes cf-bnh-mark{from{background-size:0% .44em}to{background-size:100% .44em}}
@keyframes cf-bnh-rise{from{opacity:.4;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes cf-bnh-pop{0%{transform:none}40%{transform:scale(1.04)}100%{transform:none}}
@keyframes cf-bnh-sheen{from{transform:translateX(-140%) skewX(-18deg)}to{transform:translateX(360%) skewX(-18deg)}}
@keyframes cf-bnh-lamp{from{opacity:.45;transform:scale(.78)}to{opacity:1;transform:none}}
@keyframes cf-bnh-fade{from{opacity:.25}to{opacity:1}}
@keyframes cf-bnh-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media (prefers-reduced-motion: reduce){
.cf-bnh *,.cf-bnh *::before,.cf-bnh *::after{animation:none}
.cf-bnh__c::after{display:none}
.cf-bnh__cta{transition:none}
.cf-bnh__cta:hover,.cf-bnh__cta[data-state=hover],.cf-bnh__cta:active,.cf-bnh__cta[data-state=active]{transform:none}
.cf-bnh__reel-toggle{display:none}
.cf-bnh__reel-window{-webkit-mask-image:none;mask-image:none;padding:.9rem 1.1rem}
.cf-bnh__track{width:auto;will-change:auto}
.cf-bnh__crawl-list[aria-hidden=true]{display:none}
.cf-bnh__crawl-list{flex:1 1 auto;flex-wrap:wrap;gap:.55rem 1.75rem;padding:0}
.cf-bnh__crawl-list li{white-space:normal;text-wrap:pretty}
@container cf-bnh (max-width: 519px){
.cf-bnh__crawl-list{flex-direction:column;align-items:flex-start}
}
}
`
pieces/attention/breaking-news-hero/specimen.tsx 37 lines
import __studioImage0d2f9619 from "../assets/1695d744a1b382e7.webp";
import * as React from "react"
import { BreakingNewsHero } from "../breaking-news-hero"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled"]
type SpecimenState = "default" | "hover" | "active" | "disabled"
export default function BreakingNewsHeroSpecimen({ state = "default" }: { state?: SpecimenState }) {
const workshop = defaults.sample.registration
return (
<BreakingNewsHero
state={state}
tabLabel="Breaking"
tag={workshop.eyebrow}
headline={workshop.headline}
highlight="first funnel"
lead={workshop.lead}
label="Watch the full story"
sublabel={workshop.sublabel}
href="#watch"
presenterImage={slot(
"presenter-cutout",
__studioImage0d2f9619
)}
presenterAlt="Presenter of the Funnel Starter Workshop"
lowerThirdTitle={workshop.name}
lowerThirdSubtitle="Your workshop presenter"
crawlLabel="In this workshop"
crawl={["Plan your funnel", "Write your page copy", "Check every step before you launch"]}
pauseLabel="Pause the ticker"
playLabel="Play the ticker"
/>
)
}
| Name | Type | Details |
|---|---|---|
tabLabel OptionalBreakingNewsHero |
string |
|
tag OptionalBreakingNewsHero |
string |
|
headline OptionalBreakingNewsHero |
string |
|
highlight OptionalBreakingNewsHero |
string |
|
lead OptionalBreakingNewsHero |
string |
|
label OptionalBreakingNewsHero |
string |
|
sublabel OptionalBreakingNewsHero |
string |
|
href OptionalBreakingNewsHero |
string |
|
onAction OptionalBreakingNewsHero |
(event: React.MouseEvent<HTMLElement>) => void |
|
presenterImage OptionalBreakingNewsHero |
string |
|
presenterAlt OptionalBreakingNewsHero |
string |
|
lowerThirdTitle OptionalBreakingNewsHero |
string |
|
lowerThirdSubtitle OptionalBreakingNewsHero |
string |
|
crawlLabel OptionalBreakingNewsHero |
string |
|
crawl OptionalBreakingNewsHero |
string[] |
|
pauseLabel OptionalBreakingNewsHero |
string |
|
playLabel OptionalBreakingNewsHero |
string |
|
headingLevel OptionalBreakingNewsHero |
"h1" | "h2" |
|
disabled OptionalBreakingNewsHero |
boolean |
|
state OptionalBreakingNewsHero |
"default" | "hover" | "active" | "disabled" |
|
className OptionalBreakingNewsHero |
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.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
presenter-cutout- The presenter on a transparent background.
-
1695d744a1b382e7.webp
image/webp · 109 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB