4 Animated Hero Sections That Don’t Look Like AI Slop
Explore four animated hero sections: a photo marquee, a layered product carousel, a flowing gradient, and a typing headline. Try live desktop and mobile previews, see the React code, and copy a focused UI prompt.

Your hero section should live up to its name. It should catch someone’s eye, make it clear what your site is about, and give them a reason to keep exploring.
If you’re using AI to build your site, give it a clear direction. Your hero should reflect your product, your audience, and the action you want people to take. Every image, word, and bit of motion should help tell that story.
That’s why I’ve put together these four carefully designed animated hero sections. Each has its own style and purpose, along with a live desktop and mobile preview, the code, and an AI prompt you can copy. Pick the one that fits your project, bring in your own content, and make it yours.
Four animated hero sections at a glance
Choose a photo marquee when the people or work give the page its meaning. Choose a card deck when you have several product benefits to explain. A flowing gradient can add atmosphere around one clear message, while a typing headline can introduce a small family of related capabilities.
| Hero design | What moves | Best for | Watch out for |
|---|---|---|---|
| Photo marquee | Opposing rows of photographs | Academies and communities | Irrelevant images and constant distraction |
| Product card deck | Three layered benefit cards | Apps with distinct product stories | Cards changing before people finish reading |
| Flowing gradient | Blurred color fields behind fixed copy | Launches and focused announcements | Color movement overwhelming the message |
| Typing headline | One word in a stable heading | Tools with related capabilities | Meaning that depends on waiting for a word |
01. The photo marquee: let people set the scene
The Waypoint hero from Edtech UI pairs a stationary headline with three rows of moving photographs. Black and deep green establish the background. Electric lime picks out “real AI skills,” and a large white action stays easy to find beside the imagery.
The images have a job: show the collaborative setting behind the offer. Workshops, conversations, and shared work give “learn together” a visual context. When adapting this design, choose photographs that actually belong to the program or community. A collection of unrelated stock portraits would weaken that connection.
The outer rows travel in one direction while the middle row moves the other way. Each track contains two identical image groups and translates by exactly one group width before repeating. That produces a continuous ribbon without a visible jump. The reference keeps the source’s long 70-, 85-, and 75-second loops, so visitors can read the copy while the scene moves beside it.
On mobile, the copy and action come first, followed by three shorter image rows. The full-page demo hides the third row on smaller screens; this isolated preview keeps it at a reduced height. Hovering the photographs pauses their movement; the added Pause animation button also makes that choice available to keyboard and touch users.
'use client'
import { useEffect, useId, useRef, useState } from 'react'
type EdtechHeroProps = {
brand?: string
actionHref?: string
imageBase?: string
}
const photos = [
'students-workshop.webp',
'team-collaboration.webp',
'student-group.webp',
'founder-meeting.webp',
'workshop-table.webp',
'remote-learning.webp',
'study-space.webp',
]
export function EdtechHero({
brand = 'waypoint',
actionHref = '#programs',
imageBase = '/images/demos/edtech-ui',
}: EdtechHeroProps) {
const headingId = useId()
const section = useRef<HTMLElement>(null)
const [paused, setPaused] = useState(false)
const [canMove, setCanMove] = useState(false)
const [reduced, setReduced] = useState(false)
useEffect(() => {
const preference = window.matchMedia('(prefers-reduced-motion: reduce)')
let visible = true
const sync = () => {
setReduced(preference.matches)
setCanMove(visible && !document.hidden && !preference.matches)
}
const observer = new IntersectionObserver(([entry]) => {
visible = entry.isIntersecting
sync()
})
if (section.current) observer.observe(section.current)
preference.addEventListener('change', sync)
document.addEventListener('visibilitychange', sync)
sync()
return () => {
observer.disconnect()
preference.removeEventListener('change', sync)
document.removeEventListener('visibilitychange', sync)
}
}, [])
return (
<section
ref={section}
className="eh"
aria-labelledby={headingId}
data-moving={canMove && !paused}
>
{/* The font stylesheet travels with this standalone reference component. */}
{/* eslint-disable-next-line @next/next/no-page-custom-font */}
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
<style>{`
.eh,.eh *{box-sizing:border-box}.eh{min-height:740px;overflow:hidden;background:radial-gradient(ellipse at 0% 100%,#075807 0%,#032003 32%,#000 68%);color:#fff;font-family:Inter,Arial,sans-serif}.eh h1,.eh p{margin:0}.eh :focus-visible{outline:3px solid #bff010;outline-offset:5px}.eh-top{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 48px}.eh-brand{font-size:25px;font-weight:700;letter-spacing:-.06em}.eh-brand span{color:#bff010}.eh-motion{min-height:44px;padding:8px 13px;border:1px solid #ffffff40;border-radius:999px;background:#0005;color:#e3eddf;font-size:11px;cursor:pointer}.eh-motion:disabled{cursor:default}.eh-grid{display:grid;grid-template-columns:48% 52%;align-items:center;min-height:640px}.eh-copy{padding:40px 35px 58px 48px}.eh-kicker{margin-bottom:24px!important;color:#bff010;font-size:11px;font-weight:600;letter-spacing:.15em;text-transform:uppercase}.eh h1{max-width:580px;font-size:clamp(44px,5.7vw,72px);font-weight:500;line-height:1.09;letter-spacing:-.04em}.eh h1 span{color:#bff010}.eh-description{max-width:480px;margin-top:27px!important;color:#ffffffc7;font-size:18px;line-height:1.6}.eh-action{display:inline-flex;align-items:center;justify-content:space-between;gap:24px;min-height:60px;margin-top:32px;padding:15px 28px;border-radius:14px;background:#fff;color:#000;font-size:13px;font-weight:600;text-decoration:none}.eh-action:hover{background:#bff010}.eh-note{margin-top:18px!important;color:#a9b5a4;font-size:11px;line-height:1.5}.eh-images{display:grid;gap:20px;min-width:0;overflow:hidden;padding:14px 0 30px;mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent)}.eh-row{height:165px;overflow:hidden}.eh-row:nth-child(2){height:210px}.eh-track{display:flex;width:max-content;height:100%;animation:eh-marquee 70s linear infinite;animation-play-state:paused}.eh-row:nth-child(2) .eh-track{animation-direction:reverse;animation-duration:85s}.eh-row:nth-child(3) .eh-track{animation-duration:75s}.eh[data-moving=true] .eh-track{animation-play-state:running}.eh-images:hover .eh-track{animation-play-state:paused}.eh-group{display:flex;gap:20px;padding-right:20px;height:100%}.eh-tile{position:relative;width:260px;flex:none;overflow:hidden;border-radius:24px;background:linear-gradient(135deg,#344f36,#152919)}.eh-tile:nth-child(2n){width:330px}.eh-tile:nth-child(3n){width:220px}.eh-tile img{display:block;width:100%;height:100%;object-fit:cover;filter:saturate(.85) brightness(.8)}.eh-tile:after{position:absolute;inset:0;content:'';background:linear-gradient(0deg,#47660060,transparent 65%)}@keyframes eh-marquee{to{transform:translateX(-50%)}}
@media(max-width:760px){.eh{min-height:0}.eh-top{padding:20px}.eh-brand{font-size:22px}.eh-grid{display:block;min-height:0}.eh-copy{padding:34px 20px 36px}.eh h1{font-size:clamp(42px,10vw,60px);max-width:530px}.eh-kicker{font-size:10px;margin-bottom:18px!important}.eh-description{font-size:16px;margin-top:20px!important}.eh-action{min-height:54px;margin-top:24px;padding-inline:22px}.eh-images{gap:14px;padding-bottom:28px}.eh-row{height:116px}.eh-row:nth-child(2){height:150px}.eh-group{gap:14px;padding-right:14px}.eh-tile{width:180px;border-radius:18px}.eh-tile:nth-child(2n){width:220px}.eh-tile:nth-child(3n){width:160px}}
@media(prefers-reduced-motion:reduce){.eh-track{animation:none!important}}
`}</style>
<div className="eh-top">
<div className="eh-brand">
↗ {brand}
<span>.</span>
</div>
<button
className="eh-motion"
type="button"
disabled={reduced}
aria-pressed={paused || reduced}
onClick={() => setPaused((value) => !value)}
>
{reduced ? 'Reduced motion' : paused ? 'Resume animation' : 'Pause animation'}
</button>
</div>
<div className="eh-grid">
<div className="eh-copy">
<p className="eh-kicker">Learn together. Build what matters.</p>
<h1 id={headingId}>
Turn curiosity into <span>real AI skills.</span>
</h1>
<p className="eh-description">
Practical programs, generous mentors, and a community that helps you make the leap from
learning to doing.
</p>
<a className="eh-action" href={actionHref}>
EXPLORE AI PROGRAMS <span aria-hidden="true">↗</span>
</a>
<p className="eh-note">Waypoint is a fictional academy. Illustrative learning imagery.</p>
</div>
<div className="eh-images" aria-hidden="true">
{[0, 2, 4].map((offset, row) => (
<div className="eh-row" key={row}>
<div className="eh-track">
{[0, 1].map((copy) => (
<div className="eh-group" key={copy}>
{[0, 1, 2, 3].map((index) => (
<div className="eh-tile" key={index}>
{/* These decorative photos have intentional CSS fallbacks. */}
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={`${imageBase}/${photos[(offset + index) % photos.length]}`}
width="800"
height="533"
alt=""
loading={row === 0 && copy === 0 ? 'eager' : 'lazy'}
onError={(event) => {
event.currentTarget.style.visibility = 'hidden'
}}
/>
</div>
))}
</div>
))}
</div>
</div>
))}
</div>
</div>
</section>
)
}
- The product card deck: explain one benefit at a time
The Monetra hero from Fintech UI gives the product a more tangible role. Its left column explains the promise, while three layered cards introduce spending insights, savings goals, and an account overview. Each card combines a short benefit, a photograph, and a small product detail.
The cards move between a prominent center position and two smaller positions behind it. Translation, scale, and opacity carry the transition; the active card stays upright and readable. Pale mint geometry and a restrained lime accent hold the composition together without adding another moving layer.
The source advances every 3.5 seconds with a 700-millisecond transition. This preview keeps that timing and adds previous, next, and pause controls. Rotation pauses when the deck is hovered, receives keyboard focus, leaves the viewport, or sits in a hidden tab. With reduced motion enabled, the first card stays still and the visitor can select the others manually.
On smaller screens, the deck moves below the copy. Side cards remain partially visible so it still reads as a sequence. The financial amounts are fixed illustrative data; their purpose is to demonstrate the interface. Replace them with accurate product content when adapting the component.
'use client'
import { useEffect, useId, useRef, useState } from 'react'
type FintechHeroProps = { brand?: string; actionHref?: string; secondaryHref?: string }
const cards = [
{
category: 'Spending insights',
title: 'A little coffee. A clearer picture.',
image: 'photo-1495474472287-4d71bcdd2085',
alt: 'Fresh coffee on a cafe table',
label: 'Monthly spending',
amount: '$1,245.50',
detail: 'Food & coffee',
value: '$373.65 · 30%',
},
{
category: 'Savings goals',
title: 'Make room for your next adventure.',
image: 'photo-1493976040374-85c8e12f0c0e',
alt: 'A traditional Japanese street and pagoda',
label: 'Japan Trip',
amount: '$3,400 / $5,000',
detail: 'Your next chapter',
value: '68% saved',
},
{
category: 'Your overview',
title: 'More life. Less money admin.',
image: 'photo-1497366216548-37526070297c',
alt: 'A bright, calm workspace',
label: 'Available to spend',
amount: '$2,480.00',
detail: 'Everyday account',
value: 'Monetra · 2048',
},
]
export function FintechHero({
brand = 'monetra',
actionHref = '#get-started',
secondaryHref = '#how-it-works',
}: FintechHeroProps) {
const headingId = useId()
const deckId = useId()
const root = useRef<HTMLElement>(null)
const [current, setCurrent] = useState(0)
const [paused, setPaused] = useState(false)
const [hovered, setHovered] = useState(false)
const [focused, setFocused] = useState(false)
const [canMove, setCanMove] = useState(false)
const [reduced, setReduced] = useState(false)
const [announcement, setAnnouncement] = useState('')
useEffect(() => {
const preference = window.matchMedia('(prefers-reduced-motion: reduce)')
let visible = true
const sync = () => {
setReduced(preference.matches)
setCanMove(visible && !document.hidden && !preference.matches)
}
const observer = new IntersectionObserver(([entry]) => {
visible = entry.isIntersecting
sync()
})
if (root.current) observer.observe(root.current)
preference.addEventListener('change', sync)
document.addEventListener('visibilitychange', sync)
sync()
return () => {
observer.disconnect()
preference.removeEventListener('change', sync)
document.removeEventListener('visibilitychange', sync)
}
}, [])
useEffect(() => {
if (!canMove || paused || hovered || focused) return
const timer = window.setTimeout(() => setCurrent((index) => (index + 1) % cards.length), 3500)
return () => window.clearTimeout(timer)
}, [canMove, paused, hovered, focused, current])
function select(index: number) {
const next = (index + cards.length) % cards.length
setCurrent(next)
setAnnouncement(`${cards[next].category}, ${next + 1} of ${cards.length}`)
}
return (
<section className="fh" ref={root} aria-labelledby={headingId}>
{/* The font stylesheet travels with this standalone reference component. */}
{/* eslint-disable-next-line @next/next/no-page-custom-font */}
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap"
rel="stylesheet"
/>
<style>{`
.fh,.fh *{box-sizing:border-box}.fh{min-height:760px;padding:24px 48px 32px;overflow:hidden;background:#f8f9f6;color:#142722;font-family:Inter,Arial,sans-serif}.fh h1,.fh h2,.fh p{margin:0}.fh :focus-visible{outline:3px solid #176b52;outline-offset:4px}.fh-top{display:flex;justify-content:space-between;align-items:center;gap:20px}.fh-brand{font:800 26px Manrope,Arial,sans-serif;letter-spacing:-.06em}.fh-brand span{display:inline-grid;place-items:center;width:29px;height:29px;margin-right:8px;border-radius:8px;background:#176b52;color:#fff;font-size:19px}.fh-top p{font-size:11px;color:#52635b}.fh-grid{display:grid;grid-template-columns:.92fr 1.08fr;gap:24px;align-items:center;max-width:1340px;min-height:660px;margin:auto}.fh-copy{padding:30px 0}.fh-eyebrow{display:inline-block;padding:7px 11px;border:1px solid #dfe6e0;border-radius:99px;background:#edf5ed;color:#176b52;font-size:10px;letter-spacing:.08em}.fh h1{max-width:550px;margin-top:24px;font:700 clamp(44px,5.8vw,74px)/1.06 Manrope,Arial,sans-serif;letter-spacing:-.055em}.fh h1 span{background:linear-gradient(transparent 79%,#d9f36a 79%,#d9f36a 95%,transparent 95%)}.fh-lead{max-width:440px;margin-top:26px!important;font-size:17px;line-height:1.7;color:#52635b}.fh-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:30px}.fh-link{display:inline-flex;gap:12px;min-height:52px;align-items:center;justify-content:center;padding:12px 24px;border:1px solid #176b52;border-radius:11px;background:#176b52;color:#fff;font-size:13px;font-weight:600;text-decoration:none}.fh-link.secondary{border-color:#dfe6e0;background:transparent;color:#142722}.fh-link:hover{background:#d9f36a;color:#142722}.fh-note{margin-top:20px!important;color:#52635b;font-size:12px;line-height:1.6}.fh-deck{position:relative;min-width:0}.fh-deck:before{position:absolute;content:'';left:50%;top:20px;width:330px;height:460px;transform:translateX(-50%) rotate(28deg);border:55px solid #e0eee4;border-radius:50%}.fh-stage{position:relative;height:520px;overflow:hidden;perspective:1100px;mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent)}.fh-card{position:absolute;left:50%;top:50%;width:310px;max-width:calc(100% - 24px);padding:14px;border:1px solid #dbe6dd;border-radius:24px;background:#fff;transition:transform 700ms cubic-bezier(.45,0,.2,1),opacity 700ms ease;box-shadow:0 16px 35px -15px #14272245}.fh-card[data-position=active]{z-index:3;opacity:1;transform:translate(-50%,-50%)}.fh-card[data-position=previous]{z-index:1;opacity:.38;transform:translate(-50%,-50%) translate(-150px,22px) scale(.8) rotateY(8deg)}.fh-card[data-position=next]{z-index:2;opacity:.5;transform:translate(-50%,-50%) translate(150px,22px) scale(.8) rotateY(-8deg)}.fh-category{color:#176b52;font-size:11px;font-weight:600}.fh-card h2{margin:13px 0 18px;font:600 24px/1.2 Manrope,Arial,sans-serif;letter-spacing:-.045em}.fh-photo{position:relative;height:300px;overflow:hidden;border-radius:14px;background:linear-gradient(135deg,#aac5b0,#456e55)}.fh-photo img{display:block;width:100%;height:100%;object-fit:cover}.fh-details{position:absolute;inset:auto 10px 10px;padding:16px;border:1px solid #ffffffa6;border-radius:12px;background:#fffffff5}.fh-label{display:block;font-size:11px;color:#52635b}.fh-amount{display:block;margin-top:5px;font:700 26px/1.3 Manrope,Arial,sans-serif;letter-spacing:-.04em;font-variant-numeric:tabular-nums}.fh-progress{height:6px;margin:12px 0 9px;border-radius:10px;background:linear-gradient(90deg,#176b52 0 40%,#91bd9d 40% 70%,#d9f36a 70% 90%,#dfe6e0 90%)}.fh-detail-row{display:flex;justify-content:space-between;gap:10px;font-size:10px;color:#52635b}.fh-controls{display:flex;justify-content:center;align-items:center;gap:4px}.fh-controls button{display:grid;place-items:center;min-width:40px;min-height:44px;border:0;border-radius:10px;background:none;color:#176b52;font:inherit;font-size:12px;cursor:pointer}.fh-controls button:hover{background:#e0eee4}.fh-controls .fh-dot{min-width:28px}.fh-dot span{width:6px;height:6px;border-radius:50%;background:#c4d5c8}.fh-dot[aria-current=true] span{width:18px;border-radius:6px;background:#176b52}.fh-controls .fh-pause{padding-inline:9px;font-size:11px}.fh-credit{text-align:center;color:#52635b;font-size:10px;line-height:1.6;margin-top:7px!important}.fh-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:760px){.fh{min-height:0;padding:20px}.fh-top p{max-width:100px;text-align:right;line-height:1.5}.fh-grid{display:block;min-height:0}.fh-copy{padding:42px 0 10px}.fh h1{font-size:clamp(43px,10.5vw,62px)}.fh-lead{font-size:16px;margin-top:22px!important}.fh-actions{gap:10px;margin-top:24px}.fh-link{padding-inline:18px;font-size:12px}.fh-stage{height:480px}.fh-card{width:285px}.fh-photo{height:275px}.fh-deck:before{width:280px;height:420px}.fh-card[data-position=previous]{transform:translate(-50%,-50%) translate(-125px,18px) scale(.8)}.fh-card[data-position=next]{transform:translate(-50%,-50%) translate(125px,18px) scale(.8)}}@media(prefers-reduced-motion:reduce){.fh-card{transition:none!important}}
`}</style>
<div className="fh-top">
<div className="fh-brand">
<span aria-hidden="true">↗</span>
{brand}
</div>
<p>A little clarity goes a long way.</p>
</div>
<div className="fh-grid">
<div className="fh-copy">
<span className="fh-eyebrow">THE SMARTER WAY TO MANAGE MONEY</span>
<h1 id={headingId}>
Your money, finally <span>making sense.</span>
</h1>
<p className="fh-lead">
See where your money goes, stay on top of spending, and make progress toward your
savings goals. All in one simple place.
</p>
<div className="fh-actions">
<a className="fh-link" href={actionHref}>
Get Started <span aria-hidden="true">↗</span>
</a>
<a className="fh-link secondary" href={secondaryHref}>
See How It Works
</a>
</div>
<p className="fh-note">✓ Simple tools to help you build better money habits.</p>
</div>
<div
className="fh-deck"
role="region"
aria-roledescription="carousel"
aria-label="Explore Monetra"
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
onFocusCapture={() => setFocused(true)}
onBlurCapture={(event) => {
if (!event.currentTarget.contains(event.relatedTarget)) setFocused(false)
}}
>
<div className="fh-stage" id={deckId} aria-live="off">
{cards.map((card, index) => (
<article
key={card.category}
className="fh-card"
role="group"
aria-roledescription="slide"
aria-label={`${index + 1} of 3: ${card.category}`}
aria-hidden={index !== current}
data-position={
index === current
? 'active'
: index === (current + 1) % cards.length
? 'next'
: 'previous'
}
>
<span className="fh-category">
{card.category} <span aria-hidden="true">↗</span>
</span>
<h2>{card.title}</h2>
<div className="fh-photo">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={`https://images.unsplash.com/${card.image}?auto=format&fit=crop&w=720&q=85`}
alt={card.alt}
width="600"
height="720"
onError={(event) => {
event.currentTarget.style.visibility = 'hidden'
}}
/>
<div className="fh-details">
<span className="fh-label">{card.label}</span>
<strong className="fh-amount">{card.amount}</strong>
<div
className="fh-progress"
aria-hidden="true"
style={
index === 1
? { background: 'linear-gradient(90deg, #176b52 0 68%, #dfe6e0 68%)' }
: index === 2
? { background: '#176b52' }
: undefined
}
/>
<div className="fh-detail-row">
<span>{card.detail}</span>
<strong>{card.value}</strong>
</div>
</div>
</div>
</article>
))}
</div>
<div className="fh-controls" aria-label="Card controls" aria-controls={deckId}>
<button type="button" aria-label="Previous card" onClick={() => select(current - 1)}>
←
</button>
{cards.map((card, index) => (
<button
type="button"
className="fh-dot"
key={card.category}
aria-label={`Show ${card.category}`}
aria-current={index === current ? 'true' : undefined}
onClick={() => select(index)}
>
<span />
</button>
))}
<button type="button" aria-label="Next card" onClick={() => select(current + 1)}>
→
</button>
<button
type="button"
className="fh-pause"
disabled={reduced}
aria-pressed={paused || reduced}
onClick={() => setPaused((value) => !value)}
>
{reduced ? 'Reduced motion' : paused ? 'Resume animation' : 'Pause animation'}
</button>
</div>
<p className="fh-credit">
Fictional product · illustrative amounts · photos from Unsplash
</p>
<p className="fh-sr" role="status">
{announcement}
</p>
</div>
</div>
</section>
)
}
- The flowing gradient: create a place for one clear message
The Mumble hero from Coming Soon Page UI has a short content brief: announce the launch, show the countdown, and offer an email notification. Its visual character comes from a small astronaut, geometric typography, and four blurred color fields above a diagonal white cut.
Purple, cyan, amber, and pink move through three compositions in a seamless six-second loop. The animation changes the fields’ position, rotation, and scale while the text stays fixed. Keeping the source shapes inside separate animated wrappers preserves their geometry and gives the color mixing a smooth path back to its starting point.
The white lower area gives the countdown and form a stable surface. On mobile, the timer keeps all four units on one row and the email field stacks above the blue button. The isolated hero keeps the source’s notification interaction and success dialog; the social row remains in the full-page demo.
Use a confirmed, timezone-aware launch date for a real countdown. The default here is explicitly a sample. A valid email opens the green-check success dialog locally; it does not register an address. A working waitlist needs a signup endpoint, pending and failure states, and confirmation after the request succeeds.
'use client'
import { useEffect, useId, useRef, useState, type FormEvent, type PointerEvent } from 'react'
type ComingSoonHeroProps = { brand?: string; launchAt?: string }
const sampleSeconds = 24 * 86400 + 4 * 3600 + 11 * 60 + 32
export function ComingSoonHero({ brand = 'Mumble', launchAt }: ComingSoonHeroProps) {
const id = useId()
const root = useRef<HTMLElement>(null)
const email = useRef<HTMLInputElement>(null)
const notify = useRef<HTMLButtonElement>(null)
const dialog = useRef<HTMLDialogElement>(null)
const outsidePointer = useRef(false)
const [remaining, setRemaining] = useState(sampleSeconds)
const [validDate, setValidDate] = useState(true)
const [paused, setPaused] = useState(false)
const [canMove, setCanMove] = useState(false)
const [reduced, setReduced] = useState(false)
const [dialogOpen, setDialogOpen] = useState(false)
const [error, setError] = useState('')
useEffect(() => {
const preference = window.matchMedia('(prefers-reduced-motion: reduce)')
let visible = true
const sync = () => {
setReduced(preference.matches)
setCanMove(visible && !document.hidden && !preference.matches)
}
const observer = new IntersectionObserver(([entry]) => {
visible = entry.isIntersecting
sync()
})
if (root.current) observer.observe(root.current)
preference.addEventListener('change', sync)
document.addEventListener('visibilitychange', sync)
sync()
return () => {
observer.disconnect()
preference.removeEventListener('change', sync)
document.removeEventListener('visibilitychange', sync)
}
}, [])
useEffect(() => {
let target = launchAt ? Date.parse(launchAt) : Date.now() + sampleSeconds * 1000
if (!launchAt) {
try {
const key = 'mumble-article-hero-target'
const stored = Number(sessionStorage.getItem(key))
if (Number.isFinite(stored) && stored > 0) target = stored
sessionStorage.setItem(key, String(target))
} catch {
/* The sample timer also works when storage is unavailable. */
}
}
const tick = () => {
setValidDate(Number.isFinite(target))
const value = Number.isFinite(target)
? Math.max(0, Math.ceil((target - Date.now()) / 1000))
: 0
setRemaining(value)
if (value === 0) clearInterval(timer)
}
const timer = setInterval(tick, 1000)
tick()
document.addEventListener('visibilitychange', tick)
return () => {
clearInterval(timer)
document.removeEventListener('visibilitychange', tick)
}
}, [launchAt])
useEffect(() => {
if (!dialogOpen) return
const previous = document.body.style.overflow
document.body.style.overflow = 'hidden'
return () => {
document.body.style.overflow = previous
}
}, [dialogOpen])
function submit(event: FormEvent<HTMLFormElement>) {
event.preventDefault()
const field = email.current
if (!field) return
field.value = field.value.trim()
if (!field.checkValidity()) {
setError(
field.validity.valueMissing
? 'Please enter your email address.'
: 'Please enter a valid email address.',
)
field.focus()
return
}
setError('')
dialog.current?.showModal()
setDialogOpen(true)
}
function outside(event: PointerEvent<HTMLDialogElement>) {
const rect = event.currentTarget.getBoundingClientRect()
return (
event.clientX < rect.left ||
event.clientX > rect.right ||
event.clientY < rect.top ||
event.clientY > rect.bottom
)
}
const values = [
Math.floor(remaining / 86400),
Math.floor(remaining / 3600) % 24,
Math.floor(remaining / 60) % 60,
remaining % 60,
]
const moving = canMove && !paused && !dialogOpen
return (
<section className="csh" ref={root} aria-labelledby={`${id}-heading`} data-moving={moving}>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
{/* The font stylesheet travels with this standalone reference component. */}
{/* eslint-disable-next-line @next/next/no-page-custom-font */}
<link
href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@700&family=Urbanist:wght@400;600&display=swap"
rel="stylesheet"
/>
<style>{`
.csh,.csh *{box-sizing:border-box}.csh{position:relative;isolation:isolate;min-height:790px;padding-bottom:28px;overflow:hidden;background:#fff;color:#050505;font-family:Urbanist,Arial,sans-serif;text-align:center}.csh h1,.csh p{margin:0}.csh :focus-visible{outline:3px solid #2867de;outline-offset:4px}.csh-bg{position:absolute;inset:0 0 auto;z-index:-1;height:474px;clip-path:polygon(0 0,100% 0,100% 70%,0 100%);pointer-events:none;overflow:hidden}.csh-bg svg{width:100%;height:100%}.csh-field{transform-origin:960px 540px;animation:csh-purple 6s ease-in-out infinite;animation-play-state:paused}.csh-field.cyan{animation-name:csh-cyan}.csh-field.amber{animation-name:csh-amber}.csh-field.pink{animation-name:csh-pink}.csh[data-moving=true] .csh-field{animation-play-state:running}.csh-control{position:absolute;right:20px;top:18px;min-height:44px;padding:7px 12px;border:1px solid #05050520;border-radius:99px;background:#ffffff80;color:#343434;font:400 11px Urbanist,Arial,sans-serif;cursor:pointer}.csh-intro{padding:32px 24px 98px}.csh-brand{display:inline-flex;align-items:center;gap:7px;height:28px;font:700 20px ui-monospace,monospace}.csh-brand svg{width:23px;height:28px}.csh-astronaut{display:block;width:78px;height:92px;margin:24px auto 0}.csh h1{margin-top:12px;font-size:80px;line-height:1.1;font-weight:400;letter-spacing:-.045em}.csh-description{max-width:850px;margin:16px auto 0!important;font-size:15px;line-height:1.55}.csh-description span{display:block}.csh-timer{display:grid;grid-template-columns:1fr 20px 1fr 20px 1fr 20px 1fr;max-width:510px;margin:0 auto;padding:0 8px}.csh-number{display:block;font:700 52px/1.1 'Roboto Condensed','Arial Narrow',sans-serif;font-variant-numeric:tabular-nums}.csh-label{display:block;margin-top:5px;font-size:26px;line-height:1.2}.csh-colon{font:700 48px/1.1 'Roboto Condensed',sans-serif}.csh-form{max-width:526px;margin:32px auto 0;padding:0 8px}.csh-row{display:flex;gap:16px;align-items:start}.csh-field-wrap{flex:1;min-width:0}.csh-email{display:block;width:100%;height:44px;padding:0 10px;border:1px solid #eaeaea;border-radius:5px;background:#fff;color:#050505;font:400 14px Urbanist,Arial,sans-serif}.csh-email[aria-invalid=true]{border-color:#a11b37}.csh-button{display:inline-flex;justify-content:center;align-items:center;flex:none;gap:6px;min-height:44px;padding:10px 17px;border:0;border-radius:5px;background:#4081f8;color:#fff;font:600 14px Urbanist,Arial,sans-serif;cursor:pointer}.csh-button:hover{background:#2867de}.csh-note{margin:12px 16px 0!important;color:#525252;font-size:11px;line-height:1.5}.csh-error{margin-top:8px!important;text-align:left;color:#a11b37;font-size:13px;line-height:1.4}.csh-error:empty{display:none}.csh-status{margin-top:12px!important;color:#525252;font-size:13px}.csh-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.csh-dialog{width:min(700px,calc(100% - 32px));max-height:calc(100svh - 32px);margin:auto;padding:30px 36px 26px;overflow:auto;border:0;border-radius:10px;background:#fff;color:#050505;text-align:center;box-shadow:0 24px 100px #0002}.csh-dialog::backdrop{background:#05050566}.csh-seal{display:block;width:100px;height:100px;margin:0 auto}.csh-dialog h2{margin:24px 0 0;font:600 48px/1.15 Urbanist,Arial,sans-serif;letter-spacing:-.035em}.csh-message{margin:26px auto 0!important;font-size:32px;line-height:1.45;letter-spacing:-.025em}.csh-ok{width:230px;min-height:72px;margin-top:28px;border-radius:12px;font-size:30px}
@keyframes csh-purple{0%,100%{transform:translate(0,0) rotate(0deg) scale(1)}33.333%{transform:translate(420px,200px) rotate(12deg) scale(1.12)}66.667%{transform:translate(-240px,360px) rotate(-10deg) scale(1.08)}}@keyframes csh-cyan{0%,100%{transform:translate(0,0) rotate(0deg) scale(1)}33.333%{transform:translate(300px,-240px) rotate(-10deg) scale(1.16)}66.667%{transform:translate(-360px,-120px) rotate(10deg) scale(1.1)}}@keyframes csh-amber{0%,100%{transform:translate(0,0) rotate(0deg) scale(1)}33.333%{transform:translate(-450px,240px) rotate(-12deg) scale(.98)}66.667%{transform:translate(180px,360px) rotate(8deg) scale(1.14)}}@keyframes csh-pink{0%,100%{transform:translate(0,0) rotate(0deg) scale(1)}33.333%{transform:translate(-320px,-360px) rotate(10deg) scale(1.12)}66.667%{transform:translate(260px,-440px) rotate(-12deg) scale(1.18)}}
@media(max-width:760px){.csh-control{top:8px;right:10px;min-height:36px;padding:6px 8px;font-size:10px}.csh-intro{padding:54px 16px 100px}.csh-brand{height:20px;font-size:15px}.csh-brand svg{width:16px;height:20px}.csh-astronaut{width:46px;height:56px;margin-top:32px}.csh h1{font-size:clamp(36px,9.4vw,48px);line-height:1.15}.csh-description{max-width:300px;margin-top:12px!important;font-size:14px;line-height:1.3}.csh-bg{height:384px;clip-path:polygon(0 0,100% 0,100% 82%,0 100%)}.csh-timer{grid-template-columns:1fr 10px 1fr 10px 1fr 10px 1fr;max-width:370px;padding:0 16px}.csh-number{font-size:clamp(30px,9.5vw,38px)}.csh-colon{font-size:30px}.csh-label{margin-top:3px;font-size:clamp(14px,4.4vw,17px)}.csh-form{max-width:390px;margin-top:30px;padding:0 16px}.csh-row{flex-direction:column;align-items:center;gap:16px}.csh-field-wrap{width:100%}.csh-email{font-size:13px}.csh-dialog{padding:24px}.csh-seal{width:80px;height:80px}.csh-dialog h2{font-size:30px;margin-top:20px}.csh-message{font-size:21px;margin-top:20px!important}.csh-ok{width:160px;min-height:56px;margin-top:24px;font-size:22px}}
@media(prefers-reduced-motion:reduce){.csh-field{animation:none!important}}
`}</style>
<div className="csh-bg" aria-hidden="true">
<svg viewBox="0 0 1920 1080" fill="none" preserveAspectRatio="none">
<defs>
<filter
id={`${id}-purple`}
x="-1166.51"
y="-1232.76"
width="2236.54"
height="2161.53"
filterUnits="userSpaceOnUse"
colorInterpolationFilters="sRGB"
>
<feGaussianBlur stdDeviation="280" />
</filter>
<filter
id={`${id}-cyan`}
x="-655.782"
y="-191.175"
width="2325.1"
height="2269.5"
filterUnits="userSpaceOnUse"
colorInterpolationFilters="sRGB"
>
<feGaussianBlur stdDeviation="280" />
</filter>
<filter
id={`${id}-amber`}
x="488.813"
y="-558.014"
width="1888.74"
height="1437.8"
filterUnits="userSpaceOnUse"
colorInterpolationFilters="sRGB"
>
<feGaussianBlur stdDeviation="213.333" />
</filter>
<filter
id={`${id}-pink`}
x="-41.0049"
y="-61.6118"
width="2647.81"
height="2349.25"
filterUnits="userSpaceOnUse"
colorInterpolationFilters="sRGB"
>
<feGaussianBlur stdDeviation="280" />
</filter>
</defs>
<rect width="1920" height="1080" fill="white" />
<g className="csh-field">
<g filter={`url(#${id}-purple)`}>
<ellipse
cx="521.713"
cy="557.104"
rx="521.713"
ry="557.104"
transform="matrix(0.331963 0.943292 -0.952371 0.30494 309.141 -814)"
fill="#930BFD"
/>
</g>
</g>
<g className="csh-field cyan">
<g filter={`url(#${id}-cyan)`}>
<ellipse
cx="577.468"
cy="599.632"
rx="577.468"
ry="599.632"
transform="matrix(0.331963 0.943292 -0.952371 0.30494 886.145 216)"
fill="#8BDFFF"
/>
</g>
</g>
<g className="csh-field amber">
<g filter={`url(#${id}-amber)`}>
<ellipse
cx="1433.18"
cy="160.887"
rx="531.856"
ry="265.422"
transform="rotate(15.3685 1433.18 160.887)"
fill="#FFBD47"
/>
</g>
</g>
<g className="csh-field pink">
<g filter={`url(#${id}-pink)`}>
<path
d="M1909.88 1689.36C1530.7 1883.02 396.837 1282.77 529.769 1203.53C610.861 1155.18 1067.22 1212.75 1345.86 1068.65C1523.98 976.532 1553.58 719.537 1613.94 569.062C1768.72 183.199 2292.22 1494.1 1909.88 1689.36Z"
fill="#FF1464"
/>
</g>
</g>
</svg>
</div>
<button
className="csh-control"
type="button"
disabled={reduced}
aria-pressed={paused || reduced}
onClick={() => setPaused((value) => !value)}
>
{reduced ? 'Reduced motion' : paused ? 'Resume animation' : 'Pause animation'}
</button>
<div className="csh-intro">
<div className="csh-brand">
<svg viewBox="0 0 24 30" aria-hidden="true">
<path
fill="currentColor"
d="M22.2 1C18.3 6.3 10 4.2 5 10.6.8 16 .8 22.1 4.7 26.1c.5-5.3 3.4-9.2 8.5-12.6-3.5 4-5.5 8-6 12C18.6 26.4 23 13.2 22.2 1Z"
/>
<path
d="M3.4 29c.1-6.4 3.6-12.6 9.8-17.1"
stroke="currentColor"
strokeWidth="1.6"
strokeLinecap="round"
/>
</svg>
{brand}
</div>
<svg className="csh-astronaut" viewBox="0 0 90 108" fill="none" aria-hidden="true">
<g stroke="#403846" strokeWidth="1.2" strokeLinecap="round" strokeLinejoin="round">
<path d="m29 47-12 5-1 26 9 4 10-27" fill="#BBB3AE" />
<path d="m32 70 8 23 10 7 12-5-3-7-10-1-4-20" fill="#E8E0D7" />
<path d="m42 88 7-2 10 2 3 8-12 5-7-3Z" fill="#ACA6A4" />
<path d="m41 68 18 13 10-5 6-10-6-5-10 9-11-15" fill="#E8E0D7" />
<path d="m64 65 6-4 6 4-1 6-6 7-7-1-3-6Z" fill="#ABA5A5" />
<path d="m49 45 9 6 9-8 1-11 6-1 3 15-10 16-11 1-10-9" fill="#EEE7DF" />
<path
d="m68 34-2-8 2-1 3 6-1-11 2-1 2 11 1-11 2 1-1 11 4-7 2 2-5 11-4 2Z"
fill="#C6BCB6"
/>
<path d="M23 46c5-7 19-9 27-3l8 22-25 14-11-13Z" fill="#F1EAE1" />
<path d="m28 55 19-8 5 14-18 9Z" fill="#FCF9F2" />
<path d="m31 57 13-5 2 5-13 5Z" fill="#B2A6CB" />
<path d="m23 59-4 13 4 10 6-2-1-10 6-12" fill="#EEE7DF" />
<path d="m19 71 9-1m-9 4 9-1" stroke="#87779D" strokeWidth="2" />
<path d="m22 79-1 4 2 6 2-1-1-5 4 5 2-1-3-7Z" fill="#B7ABA6" />
<path d="m31 73 23-11 2 5-23 12Z" fill="#AEA1CA" />
<path
d="M58 24c1 14-7 24-22 25C21 49 12 39 13 25 14 11 22 3 36 3c12 0 21 8 22 21Z"
fill="#EDE5DD"
/>
<path
d="M22 24C24 11 35 7 45 11c9 4 12 13 8 24-3 8-13 11-22 7-7-3-11-10-9-18Z"
fill="#302B35"
/>
<path
d="M44 13c5 1 8 6 8 11 0 3-2 4-4 1l-4-7c-2-2-2-5 0-5Z"
fill="#D4CFD3"
stroke="none"
/>
<ellipse cx="19" cy="31" rx="6" ry="7" fill="#A79C99" />
</g>
</svg>
<h1 id={`${id}-heading`}>Coming Soon</h1>
<p className="csh-description">
<span>
We’re working on something exciting — and we can’t wait to share it with you! 🚀
</span>
<span>
Stay tuned as we put the final touches on an experience built to make your life easier,
smarter, and better.
</span>
</p>
</div>
{validDate && (
<div
className="csh-timer"
role="group"
aria-label={launchAt ? 'Launch countdown' : 'Sample launch countdown'}
>
{values.flatMap((value, index) => [
...(index
? [
<span className="csh-colon" aria-hidden="true" key={`colon-${index}`}>
:
</span>,
]
: []),
<div key={index}>
<span className="csh-number">{String(value).padStart(2, '0')}</span>
<span className="csh-label">{['Days', 'Hours', 'Minutes', 'Seconds'][index]}</span>
</div>,
])}
</div>
)}
<p className="csh-status" role="status">
{!validDate
? 'Something good is on the way.'
: remaining === 0
? launchAt
? 'Launch time has arrived. Stay tuned for updates!'
: 'The sample countdown has finished.'
: ''}
</p>
<form className="csh-form" noValidate onSubmit={submit}>
<div className="csh-row">
<div className="csh-field-wrap">
<label className="csh-sr" htmlFor={`${id}-email`}>
Email address
</label>
<input
className="csh-email"
id={`${id}-email`}
ref={email}
type="email"
autoComplete="email"
required
placeholder="Enter your email address"
aria-invalid={!!error}
aria-describedby={`${id}-error ${id}-disclosure`}
onInput={() => setError('')}
/>
<p className="csh-error" id={`${id}-error`} aria-live="polite">
{error}
</p>
</div>
<button className="csh-button" type="submit" ref={notify}>
<span aria-hidden="true">🔔</span> Notify Me
</button>
</div>
<p className="csh-note" id={`${id}-disclosure`}>
Demo only — no email is sent or saved.
</p>
</form>
<p className="csh-note">
Fictional product · {launchAt ? 'Configured launch countdown' : 'Sample countdown'}
</p>
<dialog
className="csh-dialog"
ref={dialog}
aria-labelledby={`${id}-success`}
aria-describedby={`${id}-message ${id}-note`}
onPointerDown={(event) => {
outsidePointer.current = outside(event)
}}
onClick={(event) => {
const rect = event.currentTarget.getBoundingClientRect()
if (
outsidePointer.current &&
(event.clientX < rect.left ||
event.clientX > rect.right ||
event.clientY < rect.top ||
event.clientY > rect.bottom)
)
dialog.current?.close()
outsidePointer.current = false
}}
onClose={() => {
setDialogOpen(false)
notify.current?.focus({ preventScroll: true })
}}
>
<svg className="csh-seal" viewBox="0 0 120 120" aria-hidden="true">
<path
fill="#35B653"
d="M60 6c8 0 12-7 20-4s7 12 14 15 15 1 18 9-2 13 0 21 10 10 10 18-8 11-11 18 2 15-4 21-14 2-21 6-9 12-17 12-12-7-20-7-13 7-21 3-6-13-12-18S1 97 0 89s6-12 6-20S0 56 3 48s11-9 14-16-1-15 6-20S37 12 44 9s9-3 16-3Z"
transform="translate(3 2) scale(.93)"
/>
<circle cx="60" cy="60" r="34" fill="#87D497" />
<path
d="m47 61 9 9 18-22"
fill="none"
stroke="white"
strokeWidth="10"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<h2 id={`${id}-success`}>You’re on the list!</h2>
<p className="csh-message" id={`${id}-message`}>
Thanks for your email — we’ll let you know the moment we launch. 🚀
</p>
<p className="csh-note" id={`${id}-note`}>
Success-state preview only. No email was sent or saved.
</p>
<button
className="csh-button csh-ok"
type="button"
autoFocus
onClick={() => dialog.current?.close()}
>
OK
</button>
</dialog>
</section>
)
}
- The typing headline: give related jobs a shared frame
The Wordkind hero from Tool Site UI begins with a distinctive static element: “Everyday text,” set in outlined serif type inside dashed selection handles. A solid blue word below it cycles through Generator, Checker, and Formatter.
Those words describe related capabilities, so they belong to the same sentence and product. The supporting paragraph explains the tool before the cycle finishes. That makes the message understandable even if someone arrives halfway through a word or chooses to pause the effect.
The typing line reserves the width of its longest word. As letters appear and disappear, the headline, description, and buttons keep their positions. A complete static heading is available to screen readers, while the animated letters and caret are decorative. Pausing or requesting reduced motion shows a complete word and stops the caret.
Pale contour lines, a quiet paper background, and the dark navigation dock give the page its own visual language. On mobile, the heading scales down and the dock wraps in normal document flow. The secondary history action opens a small local dialog in this isolated preview; the complete tool demo contains the actual text workspace.
'use client'
import { useEffect, useId, useRef, useState } from 'react'
type ToolSiteHeroProps = { brand?: string; actionHref?: string; words?: string[] }
const defaultWords = ['Generator', 'Checker', 'Formatter']
export function ToolSiteHero({
brand = 'Wordkind',
actionHref = '#toolkit',
words = defaultWords,
}: ToolSiteHeroProps) {
const id = useId()
const section = useRef<HTMLElement>(null)
const historyDialog = useRef<HTMLDialogElement>(null)
const historyButton = useRef<HTMLButtonElement>(null)
const options = words.filter(Boolean)
const wordList = options.length ? options : defaultWords
const sequence = wordList.join('\u0000')
const first = wordList[0]
const longest = wordList.reduce((a, b) => (a.length >= b.length ? a : b))
const [typed, setTyped] = useState(first)
const [paused, setPaused] = useState(false)
const [canMove, setCanMove] = useState(false)
const [reduced, setReduced] = useState(false)
useEffect(() => {
const preference = window.matchMedia('(prefers-reduced-motion: reduce)')
let visible = true
const sync = () => {
setReduced(preference.matches)
setCanMove(visible && !document.hidden && !preference.matches)
}
const observer = new IntersectionObserver(([entry]) => {
visible = entry.isIntersecting
sync()
})
if (section.current) observer.observe(section.current)
preference.addEventListener('change', sync)
document.addEventListener('visibilitychange', sync)
sync()
return () => {
observer.disconnect()
preference.removeEventListener('change', sync)
document.removeEventListener('visibilitychange', sync)
}
}, [])
useEffect(() => {
if (!canMove || paused) return
const list = sequence.split('\u0000')
let word = 0
let position = list[0].length
let deleting = true
let timer: ReturnType<typeof setTimeout>
function step() {
if (deleting) {
position -= 1
setTyped(list[word].slice(0, position))
if (position === 0) {
deleting = false
word = (word + 1) % list.length
timer = setTimeout(step, 250)
} else timer = setTimeout(step, 45)
} else {
position += 1
setTyped(list[word].slice(0, position))
if (position === list[word].length) {
deleting = true
timer = setTimeout(step, 1800)
} else timer = setTimeout(step, 85)
}
}
// Begin with a complete word so the meaning is available before any motion.
timer = setTimeout(() => {
setTyped(list[0])
timer = setTimeout(step, 1800)
}, 0)
return () => clearTimeout(timer)
}, [canMove, paused, sequence])
const moving = canMove && !paused
return (
<section className="th" ref={section} aria-labelledby={`${id}-heading`} data-moving={moving}>
{/* The font stylesheet travels with this standalone reference component. */}
{/* eslint-disable-next-line @next/next/no-page-custom-font */}
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Lora:wght@500;600;700&display=swap"
rel="stylesheet"
/>
<style>{`
.th,.th *{box-sizing:border-box}.th{position:relative;isolation:isolate;min-height:760px;overflow:hidden;background:linear-gradient(180deg,#e7f1f5 65%,#f8fbfc 100%);color:#21322f;font-family:Inter,Arial,sans-serif;text-align:center}.th h1,.th p{margin:0}.th :focus-visible{outline:3px solid #1769e8;outline-offset:5px}.th-top{position:relative;z-index:2;display:flex;justify-content:center;align-items:center;gap:20px;min-height:64px;padding:10px 36px;border-bottom:1px solid #cddad9;background:#fff}.th-brand{display:inline-flex;align-items:center;gap:8px;font:600 22px Lora,Georgia,serif;letter-spacing:-.04em}.th-mark{display:inline-block;width:25px;height:25px;border-radius:50%;background:linear-gradient(90deg,#bacac7 0 45%,#fff 45% 55%,#1769e8 55%)}.th-motion{position:absolute;right:24px;min-height:44px;padding:8px 12px;border:1px solid #cddad9;border-radius:7px;background:#fff;color:#52635f;font-size:11px;cursor:pointer}.th-wave{position:absolute;z-index:-1;inset:64px -15% 0;width:130%;height:700px;color:#fff;opacity:.8}.th-wave path{fill:none;stroke:currentColor;stroke-width:1}.th-wave:after{content:''}.th-copy{position:relative;max-width:850px;margin:auto;padding:90px 30px 58px}.th h1{font:600 clamp(44px,6vw,74px)/1.18 Lora,Georgia,serif;letter-spacing:-.045em}.th-frame{position:relative;display:inline-block;border:1.5px dashed #21322f;padding:13px 27px;color:#f8fbfc;-webkit-text-stroke:1.4px #21322f}.th-frame i{position:absolute;width:13px;height:13px;border:1px solid #21322f;background:#fff}.th-frame i:nth-child(1){top:-7px;left:-7px}.th-frame i:nth-child(2){top:-7px;right:-7px}.th-frame i:nth-child(3){bottom:-7px;left:-7px}.th-frame i:nth-child(4){bottom:-7px;right:-7px}.th-typing{display:block;margin-top:18px;color:#1769e8}.th-slot{position:relative;display:inline-grid;grid-template-columns:1fr;align-items:center;text-align:left}.th-measure,.th-word{grid-area:1/1}.th-measure{visibility:hidden}.th-word{white-space:nowrap}.th-caret{display:inline-block;width:2px;height:.8em;margin-left:5px;vertical-align:-.02em;background:#1769e8;animation:th-blink 1s step-end infinite}.th[data-moving=false] .th-caret{visibility:hidden;animation:none}.th-description{max-width:520px;margin:24px auto 0!important;font-size:17px;line-height:1.8;color:#52635f}.th-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:26px}.th-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:12px 22px;border:1px solid #cddad9;border-radius:7px;background:#fff;color:#21322f;font:500 13px Inter,Arial,sans-serif;text-decoration:none;cursor:pointer}.th-button.primary{border-color:#1769e8;background:#1769e8;color:#fff}.th-button:hover{background:#e7f1f5;color:#21322f}.th-note{margin-top:15px!important;font-size:12px;color:#52635f}.th-dock{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:4px;width:fit-content;max-width:100%;margin:35px auto 0;padding:7px;border-radius:12px;background:#21322f;box-shadow:0 12px 30px #21322f16}.th-dock a{display:inline-flex;align-items:center;min-height:44px;padding:8px 15px;color:#d9e2df;font-size:12px;text-decoration:none;border-radius:6px}.th-dock a:hover{background:#354942;color:#fff}.th-dock .th-dock-cta{background:#fff;color:#21322f}.th-dialog{max-width:420px;width:calc(100% - 32px);max-height:calc(100svh - 32px);margin:auto;padding:28px;border:1px solid #cddad9;border-radius:14px;background:#f8fbfc;color:#21322f;text-align:left}.th-dialog::backdrop{background:#21322f66}.th-dialog h2{margin:0;font:600 25px Lora,Georgia,serif}.th-dialog p{margin:14px 0 22px;line-height:1.7;color:#52635f;font-size:14px}.th-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@keyframes th-blink{50%{opacity:0}}@supports not(-webkit-text-stroke:1px black){.th-frame{color:#21322f}}
@media(max-width:760px){.th{min-height:780px}.th-top{justify-content:space-between;padding:16px 20px}.th-motion{position:static}.th-brand{font-size:20px}.th-copy{padding:80px 20px 40px}.th h1{font-size:clamp(35px,8.7vw,56px)}.th-frame{padding:13px 14px;-webkit-text-stroke:1px #21322f}.th-typing{margin-top:24px}.th-description{margin-top:25px!important;font-size:15px;line-height:1.8}.th-actions{gap:10px;margin-top:24px}.th-button{padding-inline:16px;font-size:12px}.th-dock{margin-top:32px}.th-dock a{padding-inline:12px;font-size:11px}.th-wave{inset:150px -60% 0;width:220%}}
@media(prefers-reduced-motion:reduce){.th-caret{animation:none!important;visibility:hidden}}
`}</style>
<div className="th-top">
<div className="th-brand">
<span className="th-mark" aria-hidden="true" />
{brand}
</div>
<button
className="th-motion"
type="button"
disabled={reduced}
aria-pressed={paused || reduced}
onClick={() => setPaused((value) => !value)}
>
{reduced ? 'Reduced motion' : paused ? 'Resume animation' : 'Pause animation'}
</button>
</div>
<svg className="th-wave" viewBox="0 0 1440 850" preserveAspectRatio="none" aria-hidden="true">
{Array.from({ length: 36 }, (_, index) => (
<path
key={index}
d={`M-120 ${180 + index * 16} C120 ${115 + index * 16} 255 ${245 + index * 16} 460 ${180 + index * 16} S745 ${122 + index * 16} 940 ${186 + index * 16} S1230 ${264 + index * 16} 1560 ${174 + index * 16}`}
/>
))}
</svg>
<div className="th-copy">
<h1 id={`${id}-heading`}>
<span className="th-sr">Everyday text. {wordList.join(', ')}.</span>
<span aria-hidden="true">
<span className="th-frame">
Everyday text
<i />
<i />
<i />
<i />
</span>
<span className="th-typing">
<span className="th-slot">
<span className="th-measure">
{longest}
<span className="th-caret" />
</span>
<span className="th-word">
{moving ? typed : first}
<span className="th-caret" />
</span>
</span>
</span>
</span>
</h1>
<p className="th-description">
A few thoughtful tools for the words in your work. Create a starting point, tidy up a
draft, and get back to making something good.
</p>
<div className="th-actions">
<a className="th-button primary" href={actionHref}>
▧ Start creating
</a>
<button
className="th-button"
type="button"
ref={historyButton}
onClick={() => historyDialog.current?.showModal()}
>
↶ Your history
</button>
</div>
<p className="th-note">No sign-up. Just a little wordcraft.</p>
<nav className="th-dock" aria-label="Wordkind navigation">
<a href="#home" aria-label="Wordkind home">
<span className="th-mark" aria-hidden="true" />
</a>
<a href="#home">Home</a>
<a href={actionHref}>The toolkit</a>
<a href="#features">Features</a>
<a href="#pricing">Pricing</a>
<a href="#about">About</a>
<a className="th-dock-cta" href={actionHref}>
Try it ↗
</a>
</nav>
<p className="th-note">Wordkind is a fictional tool. Preview destinations.</p>
</div>
<dialog
className="th-dialog"
ref={historyDialog}
aria-labelledby={`${id}-history`}
onClose={() => historyButton.current?.focus({ preventScroll: true })}
>
<h2 id={`${id}-history`}>A little room for your work.</h2>
<p>
This hero preview has no saved history. In a working tool, this action opens the visitor’s
recent documents.
</p>
<button
className="th-button primary"
type="button"
onClick={() => historyDialog.current?.close()}
>
Back to creating
</button>
</dialog>
</section>
)
}Choose what should move
Start with what you can show honestly. A community with useful photography may suit the marquee. A product with three distinct benefits may suit the card deck. A short announcement can use the gradient, while a tool with related functions can use the changing word.
Then put your real headline, images, and action into the design. The motion should still make sense with those replacements. If the photographs have no connection to the offer, or the rotating words do not explain the tool, refine the content before adjusting the animation.
Give the page one dominant moving element. The examples keep their main copy and actions stationary while the photographs, cards, background, or word do the moving. That relationship helps each hero keep a clear hierarchy.
Get the motion right before you publish
- Make the first frame useful. A complete headline and visible action should be available before any timer or animation runs.
- Leave time to read. Test the card dwell time with your actual content. Longer copy may need a slower cycle or manual selection.
- Keep the layout steady. Reserve image dimensions and the longest typing word’s width. Transform the artwork rather than moving the surrounding layout.
- Provide a still version. Every preview respects reduced motion and includes an explicit pause control. The design should retain its character when stopped.
- Check a narrow screen. Review at 390px and 320px, with your real copy. Keep controls reachable and the main action clear.
- Pause work people cannot see. These reference components suspend decorative motion in hidden tabs and when their hero leaves the viewport, and clean up timers and observers when removed.
How to use the AI prompts
- 1Choose the hero whose moving element supports your product’s message. Try its desktop and mobile previews.
- 2Copy the AI prompt and tell your coding tool which existing hero to replace. Include your framework, real headline, primary action, and image assets.
- 3Keep the visual details that make the example recognizable: its typography, palette, composition, and animation behavior. Replace the fictional content and local preview actions.
- 4Compare the result with the reference. Check pause and resume, reduced motion, mobile layout, keyboard focus, and any form or dialog. Connect real destinations before publishing.
The prompt includes the same self-contained React reference shown in the Code tab. It supplies a concrete implementation to adapt; review the generated result in your own project, including asset paths and external font loading.
Keep exploring