Scroll Lit Paragraph 1
Scroll-lit paragraph: the feature list reads as one big display sentence. Each phrase lights as it crosses the middle of the screen (or on click or focus) and swaps the product shot on the stage beside it. One outcome button closes the section.
Use it in a prompt
Use content/scroll-lit-paragraph 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/scroll-lit-paragraph.tsx. - Import it and pass your copy and images (Props tab):
import { ScrollLitParagraph } from "@/components/funneldna/content/scroll-lit-paragraph"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/scroll-lit-paragraph/component.tsx 299 lines
// layout: product-stage
// Scroll-lit paragraph: the feature list reads as one big display sentence. Each phrase lights as it crosses the middle of the screen (or on click or focus) and swaps the product shot on the stage beside it. One outcome button closes the section.
import React, { useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
import { useReducedMotion } from "motion/react";
import { ShieldCheck } from "lucide-react";
import { Divider, FX_HOST, Spot } from "../fx/fx";
import torn from "../fx/dividers/torn";
import calendar from "../fx/spots/calendar";
import book from "../fx/spots/book";
import checklist from "../fx/spots/checklist";
export type ScrollLitFeature = {
/** Name shown in the feature chip under the product shot. */
title: string;
/** Phrases in the big sentence that light this card, e.g. ["Build your list.", "Sort it by aisle."]. */
phrases: string[];
/** One line under the chip: what the feature does for the visitor. */
line: string;
/** Screen or product shot (slots item-1 … item-n). Without one the frame shows the spot illustration. */
image?: string;
imageAlt?: string;
/** An imported fx spot asset (e.g. import calendar from "../fx/spots/calendar"). */
spot?: string;
};
export type ScrollLitParagraphProps = {
/** Opening words of the sentence; always lit and the section heading. */
question?: React.ReactNode;
features?: ScrollLitFeature[];
/** Closing words after the last phrase (not interactive). */
tail?: string;
/** Outcome-verb button label. */
label?: string;
/** One short reassurance line under the button. */
note?: string;
href?: string;
onAction?: () => void;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
const DEFAULT_FEATURES: ScrollLitFeature[] = [
{
title: "Funnel planner",
phrases: ["Map your offer.", "Plan every page."],
line: "Lay out the pages your funnel needs before you build a thing.",
spot: calendar,
},
{
title: "Copy workbook",
phrases: ["Draft your headline.", "Write your call to action."],
line: "Fill-in prompts that turn your offer into page copy tonight.",
spot: book,
},
{
title: "Launch checklist",
phrases: ["Check every link.", "Test every form."],
line: "Walk each step once more so nothing breaks on launch day.",
spot: checklist,
},
];
export function ScrollLitParagraph(props: ScrollLitParagraphProps) {
const {
question = "What is inside the kit?",
features = DEFAULT_FEATURES,
tail = "All in one download.",
label = "Start planning my funnel",
note = "One payment · Lifetime access",
href,
onAction,
state = "default",
className,
} = props;
const uid = useId().replace(/:/g, "");
const reduce = useReducedMotion() === true;
const phrases = useMemo(
() => features.flatMap((f, fi) => f.phrases.map((text) => ({ text, fi }))),
[features],
);
const [active, setActive] = useState(0);
const paraRef = useRef<HTMLDivElement>(null);
const holdRef = useRef<number | null>(null);
useEffect(() => {
if (reduce || phrases.length < 2) return;
let raf = 0;
const measure = () => {
raf = 0;
const el = paraRef.current;
if (!el) return;
const r = el.getBoundingClientRect();
if (holdRef.current !== null) {
if (Math.abs(r.top - holdRef.current) < 80) return;
holdRef.current = null;
}
const vh = window.innerHeight || 1;
const p = (vh * 0.62 - r.top) / (vh * 0.24 + r.height);
const i = Math.min(phrases.length - 1, Math.max(0, Math.floor(p * phrases.length)));
setActive(i);
};
const onScroll = () => {
if (!raf) raf = window.requestAnimationFrame(measure);
};
measure();
document.addEventListener("scroll", onScroll, { passive: true, capture: true });
window.addEventListener("resize", onScroll);
return () => {
if (raf) window.cancelAnimationFrame(raf);
document.removeEventListener("scroll", onScroll, { capture: true });
window.removeEventListener("resize", onScroll);
};
}, [reduce, phrases.length]);
const pick = useCallback((i: number) => {
const el = paraRef.current;
holdRef.current = el ? el.getBoundingClientRect().top : null;
setActive(i);
}, []);
const fi = Math.min(features.length - 1, Math.max(0, phrases[active]?.fi ?? 0));
const feature = features[fi];
const disabled = state === "disabled";
const btnClass = "cf-slp__btn" + (state === "hover" ? " is-hover" : "") + (state === "active" ? " is-active" : "");
const stageId = uid + "-stage";
return (
<section
className={"cf-slp" + (reduce ? " is-still" : "") + (className ? " " + className : "")}
style={{ ...FX_HOST, overflow: "clip" }}
aria-labelledby={uid + "-q"}
>
<style>{CSS}</style>
<div className="cf-slp__inner">
<div className="cf-slp__copy">
<div className="cf-slp__para" ref={paraRef}>
<h2 id={uid + "-q"} className="cf-slp__q">{question}</h2>{" "}
<p className="cf-slp__phrases">
{phrases.map((p, i) => {
const lit = reduce || i === active;
return (
<React.Fragment key={i}>
{/* Inline role=button so a phrase wraps like running text; keyboard and pointer both light it. */}
<span
role="button"
tabIndex={0}
aria-pressed={i === active}
aria-controls={stageId}
className={"cf-slp__phrase" + (lit ? " is-lit" : "")}
onClick={() => pick(i)}
onFocus={() => pick(i)}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
pick(i);
}
}}
>
{p.text}
</span>{" "}
</React.Fragment>
);
})}
{tail ? <span className="cf-slp__tail">{tail}</span> : null}
</p>
</div>
<div className="cf-slp__action">
{href && !disabled ? (
<a className={btnClass} href={href} onClick={onAction ? () => onAction() : undefined}>
{label}
</a>
) : (
<button type="button" className={btnClass} disabled={disabled} onClick={onAction ? () => onAction() : undefined}>
{label}
</button>
)}
{note ? (
<p className="cf-slp__note">
<ShieldCheck size={16} strokeWidth={2.5} aria-hidden="true" />
{note}
</p>
) : null}
</div>
</div>
<div className="cf-slp__stage-col">
<figure className="cf-slp__stage" id={stageId}>
<div className="cf-slp__frame">
<div className="cf-slp__screen">
{features.map((f, i) =>
f.image ? (
<img
key={i}
className={"cf-slp__shot" + (i === fi ? " is-on" : "")}
src={f.image}
alt={i === fi ? f.imageAlt || f.title : ""}
aria-hidden={i === fi ? undefined : true}
loading={i === 0 ? "eager" : "lazy"}
width={960}
height={720}
/>
) : (
<div key={i} className={"cf-slp__fallback" + (i === fi ? " is-on" : "")} aria-hidden="true">
{f.spot ? <Spot src={f.spot} size={132} shade="band" light="band-ink" /> : null}
</div>
),
)}
</div>
</div>
<div className="cf-slp__track" aria-hidden="true">
{features.map((_, i) => (
<span key={i} className={i === fi ? "is-on" : i < fi ? "is-done" : ""} />
))}
</div>
{feature ? (
<figcaption className="cf-slp__caption" key={fi}>
{feature.spot ? (
<span className="cf-slp__spot" aria-hidden="true">
<Spot src={feature.spot} size={56} shade="band" light="band-ink" />
</span>
) : null}
<span className="cf-slp__caption-text">
<span className="cf-slp__chip">{feature.title}</span>
<span className="cf-slp__line">{feature.line}</span>
</span>
</figcaption>
) : null}
</figure>
</div>
</div>
<Divider shape="torn" src={torn} tone="surface" height={48} />
</section>
);
}
export default ScrollLitParagraph;
const CSS = `
.cf-slp{position:relative;background:var(--band);color:var(--band-ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) calc(clamp(64px,8.5vw,120px) + 48px)}
.cf-slp *{box-sizing:border-box}
.cf-slp__inner{position:relative;z-index:1;max-width:1120px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:clamp(32px,5vw,72px);align-items:stretch}
.cf-slp__copy,.cf-slp__stage-col{min-width:0}
.cf-slp__para{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.16;letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);text-wrap:pretty;color:color-mix(in oklch,var(--band-ink) 55%,var(--band))}
.cf-slp__q,.cf-slp__phrases{display:block;margin:0;font:inherit;letter-spacing:inherit;text-transform:inherit}
.cf-slp__q{color:var(--band-ink);text-wrap:balance;line-height:1.08;margin-bottom:.3em}
.cf-slp__phrases{text-wrap:pretty}
.cf-slp__phrase{color:color-mix(in oklch,var(--band-ink) 55%,var(--band));cursor:pointer;border-radius:4px;-webkit-box-decoration-break:clone;box-decoration-break:clone;transition:color .3s cubic-bezier(.2,.7,.2,1);-webkit-tap-highlight-color:transparent}
.cf-slp__phrase:hover{color:color-mix(in oklch,var(--band-ink) 80%,var(--band))}
.cf-slp__phrase.is-lit{color:var(--band-ink)}
.cf-slp__phrase:focus{outline:none}
.cf-slp__phrase:focus-visible{outline:3px solid oklch(from var(--band-ink) l c h / .55);outline-offset:3px}
.cf-slp.is-still .cf-slp__para{color:var(--band-ink)}
.cf-slp__action{display:grid;justify-items:stretch;width:fit-content;max-width:100%;margin-top:clamp(32px,4vw,48px)}
.cf-slp__action .cf-slp__btn{min-width:min(100%,320px)}
.cf-slp__action .cf-slp__note{text-align:center}
.cf-slp__btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:64px;max-width:100%;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .4),0 8px 16px -6px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .5));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-slp__btn:hover:not(:disabled),.cf-slp__btn.is-hover{background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .18) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .45),0 12px 20px -6px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .6)}
.cf-slp__btn:active:not(:disabled),.cf-slp__btn.is-active{transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h / .5),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .4)}
.cf-slp__btn:focus-visible{outline:3px solid oklch(from var(--band-ink) l c h / .6);outline-offset:3px}
.cf-slp__btn:disabled{cursor:not-allowed;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:var(--shadow-sm,0 1px 2px oklch(.22 .03 260 / .25));transform:none}
.cf-slp__note{margin:12px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;color:color-mix(in oklch,var(--band-ink) 80%,var(--band));text-wrap:pretty}
.cf-slp__note svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-slp__stage{position:sticky;top:max(24px,calc(50vh - 270px));margin:0}
.cf-slp__frame{padding:8px;border-radius:var(--card-radius,var(--radius,14px));background:oklch(from var(--band) calc(l + .06) c h);border:1px solid oklch(from var(--band-ink) l c h / .14);box-shadow:inset 0 1px 0 oklch(from var(--band-ink) l c h / .1),var(--shadow-lg,0 2px 4px oklch(.22 .03 260 / .22),0 12px 24px -8px oklch(.22 .03 260 / .32))}
.cf-slp__screen{position:relative;aspect-ratio:4 / 3;overflow:hidden;border-radius:calc(var(--card-radius,var(--radius,14px)) - 6px);background:oklch(from var(--band) calc(l + .1) c h)}
.cf-slp__shot{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center top;opacity:0;transition:opacity .4s cubic-bezier(.2,.7,.2,1)}
.cf-slp__fallback{position:absolute;inset:0;display:grid;place-items:center;opacity:0;transition:opacity .4s cubic-bezier(.2,.7,.2,1)}
.cf-slp__shot.is-on,.cf-slp__fallback.is-on{opacity:1}
.cf-slp__track{display:flex;gap:6px;margin-top:16px}
.cf-slp__track span{flex:1;height:4px;border-radius:999px;background:oklch(from var(--band-ink) l c h / .16);transition:background .3s ease}
.cf-slp__track span.is-on,.cf-slp__track span.is-done{background:var(--accent-fill,var(--accent))}
.cf-slp__caption{display:flex;align-items:flex-start;gap:16px;margin-top:20px;animation:cf-slp-in .45s cubic-bezier(.2,.7,.2,1) both}
.cf-slp__spot{flex:none;line-height:0}
.cf-slp__caption-text{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
.cf-slp__chip{display:inline-flex;align-items:center;min-height:30px;padding:4px 12px;border-radius:999px;background:oklch(from var(--band-ink) l c h / .12);color:var(--band-ink);font-size:.875rem;font-weight:800;line-height:1.2}
.cf-slp__line{display:block;margin-top:8px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:color-mix(in oklch,var(--band-ink) 82%,var(--band));text-wrap:pretty}
@keyframes cf-slp-in{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (max-width:860px){
.cf-slp__inner{grid-template-columns:minmax(0,1fr);gap:32px}
.cf-slp__copy{display:contents}
.cf-slp__para{order:0}
.cf-slp__stage-col{order:1}
.cf-slp__action{order:2;margin-top:0;width:100%;max-width:28rem}
.cf-slp__stage{position:static}
}
@media (max-width:520px){
.cf-slp__caption{gap:12px}
}
@media (prefers-reduced-motion: reduce){
.cf-slp__phrase,.cf-slp__shot,.cf-slp__fallback,.cf-slp__track span,.cf-slp__btn{transition:none}
.cf-slp__caption{animation:none}
.cf-slp__btn:hover:not(:disabled),.cf-slp__btn.is-hover,.cf-slp__btn:active:not(:disabled),.cf-slp__btn.is-active{transform:none}
}
`;
pieces/content/scroll-lit-paragraph/specimen.tsx 60 lines
import __studioImagea21343d7 from "../assets/fe24d254ca73710e.webp";
import __studioImage445c1d74 from "../assets/1bbf5e841b5042c9.webp";
import __studioImage90303433 from "../assets/b53412986f398ec9.webp";
// Specimen: Forkful, a fictional meal-planning app, on its free-trial page.
import ScrollLitParagraph from "../scroll-lit-paragraph";
import { slot } from "../../slots";
import calendar from "../../fx/spots/calendar";
import checklist from "../../fx/spots/checklist";
import chart from "../../fx/spots/chart";
export const states = ["default", "hover", "active", "disabled"];
type State = "default" | "hover" | "active" | "disabled";
export default function ScrollLitParagraphSpecimen({ state = "default" }: { state?: State }) {
return (
<ScrollLitParagraph
state={state}
question="What else can Forkful do?"
features={[
{
title: "Week planner",
phrases: ["It can plan your meals.", "Swap any recipe."],
line: "Seven dinners mapped by Sunday. Tap any night to trade the recipe.",
image: slot(
"item-1",
__studioImagea21343d7,
),
imageAlt: "Forkful week planner with seven dinners laid out by day",
spot: calendar,
},
{
title: "Smart list",
phrases: ["Build your list.", "Sort it by aisle."],
line: "Every ingredient from your week, grouped the way your store is laid out.",
image: slot(
"item-2",
__studioImage445c1d74,
),
imageAlt: "Forkful shopping list grouped by store aisle",
spot: checklist,
},
{
title: "Macro tracker",
phrases: ["Track your macros.", "Hit your protein."],
line: "Meals log themselves, so you see protein, carbs and fat at a glance.",
image: slot(
"item-3",
__studioImage90303433,
),
imageAlt: "Forkful macro tracker with protein, carb and fat rings",
spot: chart,
},
]}
tail="And plenty more."
label="Plan my first week"
note="7 days free · Cancel anytime in two taps"
/>
);
}
| Name | Type | Details |
|---|---|---|
question OptionalScrollLitParagraph |
React.ReactNode |
|
features OptionalScrollLitParagraph |
ScrollLitFeature[] |
|
tail OptionalScrollLitParagraph |
string |
|
label OptionalScrollLitParagraph |
string |
|
note OptionalScrollLitParagraph |
string |
|
href OptionalScrollLitParagraph |
string |
|
onAction OptionalScrollLitParagraph |
() => void |
|
state OptionalScrollLitParagraph |
"default" | "hover" | "active" | "disabled" |
|
className OptionalScrollLitParagraph |
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.
--card-radius- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-2- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-3- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
1bbf5e841b5042c9.webp
image/webp · 74.6 KB
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
369bb6f216bb84ab.webp
image/webp · 22.6 KB
-
9a2ebdab5ff4fcc4.webp
image/webp · 3.64 KB
-
b53412986f398ec9.webp
image/webp · 71.2 KB
-
bc3d360c88eeac0e.webp
image/webp · 23.9 KB
-
d0943b629c0b1324.webp
image/webp · 8.87 KB
-
fe24d254ca73710e.webp
image/webp · 190 KB