This Not That Lines 1
This, not that: a stack of short "not" lines in huge type that grey, shrink and step back as the reader scrolls, until one line is left standing in the accent colour and its full stop pulses once. Pure rhythm, no button.
Use it in a prompt
Use content/this-not-that-lines 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/this-not-that-lines.tsx. - Import it and pass your copy and images (Props tab):
import { ThisNotThatLines } from "@/components/funneldna/content/this-not-that-lines"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/this-not-that-lines/component.tsx 299 lines
// layout: scroll-panels
// This, not that: a stack of short "not" lines in huge type that grey, shrink and step back as the reader scrolls, until one line is left standing in the accent colour and its full stop pulses once. Pure rhythm, no button.
import React, { useEffect, useRef, useState } from "react";
import { Texture, Divider, FX_HOST } from "../fx/fx";
import concrete from "../fx/textures/concrete";
export type ThisNotThatLinesProps = {
/** The "not" lines that fall away, in reading order (3–4 reads best). */
notLines?: string[];
/** The one line left standing, full size, in the accent role. Its closing punctuation pulses once when it lands. */
finalLine?: string;
/** Optional phrase inside finalLine (verbatim) swiped with the marker highlight. */
highlight?: string;
/** Optional short line under the stack. */
note?: React.ReactNode;
/** light = quiet tinted surface band; dark = the theme's dark band. */
tone?: "light" | "dark";
/** Band texture: an imported fx texture module (e.g. `import linen from "../fx/textures/linen"`). */
texture?: typeof concrete;
/** Render the finished composition with no scroll motion. */
still?: boolean;
id?: string;
className?: string;
};
export function ThisNotThatLines(props: ThisNotThatLinesProps) {
const {
notLines = ["Not another course.", "Not another app.", "Not another coach."],
finalLine = "A plan you'll finish.",
highlight,
note,
tone = "light",
texture = concrete,
still = false,
id,
className,
} = props;
const lines = notLines.map((s) => (s ?? "").trim()).filter(Boolean);
const final = (finalLine ?? "").trim();
const total = lines.length + (final ? 1 : 0);
const dark = tone === "dark";
const lineRefs = useRef<Array<HTMLSpanElement | null>>([]);
const endRef = useRef<HTMLSpanElement | null>(null);
// -1 = not enhanced yet (server, no-JS): render the finished composition.
const [step, setStep] = useState<number>(-1);
const [ready, setReady] = useState(false);
useEffect(() => {
if (typeof window === "undefined" || total === 0) return;
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
let raf = 0;
let ready1 = 0;
let ready2 = 0;
let attached = false;
const measure = () => {
raf = 0;
const vh = window.innerHeight || document.documentElement.clientHeight;
const trigger = vh * 0.72;
let n = 0;
for (let i = 0; i < total; i++) {
const el = lineRefs.current[i];
if (el && el.getBoundingClientRect().top < trigger) n = i + 1;
}
// Whole stack on screen (short page, end of page, or scrolled past): land it.
const end = endRef.current;
if (end && end.getBoundingClientRect().bottom <= vh) n = total;
setStep((prev) => (prev === n ? prev : n));
};
const schedule = () => {
if (!raf) raf = requestAnimationFrame(measure);
};
const attach = () => {
if (attached) return;
attached = true;
window.addEventListener("scroll", schedule, { passive: true, capture: true });
window.addEventListener("resize", schedule);
};
const detach = () => {
if (!attached) return;
attached = false;
window.removeEventListener("scroll", schedule, true);
window.removeEventListener("resize", schedule);
};
const sync = () => {
if (still || mq.matches) {
detach();
setStep(total);
} else {
attach();
measure();
}
};
sync();
ready1 = requestAnimationFrame(() => {
ready2 = requestAnimationFrame(() => setReady(true));
});
mq.addEventListener?.("change", sync);
return () => {
detach();
if (raf) cancelAnimationFrame(raf);
cancelAnimationFrame(ready1);
cancelAnimationFrame(ready2);
mq.removeEventListener?.("change", sync);
};
}, [total, still]);
if (total === 0) return null;
const enhanced = step >= 0;
const cut = enhanced ? step - 1 : total - 1;
const landed = !!final && (!enhanced || step >= total);
const parts = splitFinal(final, highlight);
return (
<section
id={id}
className={`cf-this-not-that-lines${className ? ` ${className}` : ""}`}
data-tone={dark ? "dark" : "light"}
data-ready={ready ? "" : undefined}
style={FX_HOST}
>
<style>{CSS}</style>
<Texture src={texture} tone={dark ? "band-ink" : "ink"} />
<div className="cf-tnt__inner">
<h2 className="cf-tnt__stack">
{lines.map((text, i) => (
<React.Fragment key={`${i}-${text}`}>
<span
ref={(el) => {
lineRefs.current[i] = el;
}}
className="cf-tnt__line"
data-fallen={i < cut ? "true" : "false"}
>
{text}
</span>{" "}
</React.Fragment>
))}
{final ? (
<span
ref={(el) => {
lineRefs.current[lines.length] = el;
}}
className="cf-tnt__line cf-tnt__final"
data-landed={landed ? "true" : "false"}
>
{parts.before}
{parts.mark ? <span className="cf-tnt__hl">{parts.mark}</span> : null}
{parts.after}
{parts.stop ? <span className="cf-tnt__stop">{parts.stop}</span> : null}
</span>
) : null}
</h2>
{note ? <p className="cf-tnt__note">{note}</p> : null}
<span ref={endRef} className="cf-tnt__end" aria-hidden="true" />
</div>
<Divider shape="angle" tone="surface" height={56} />
</section>
);
}
export default ThisNotThatLines;
// Splits the final line into text, the optional marker phrase and the closing punctuation that pulses.
function splitFinal(text: string, highlight?: string) {
const m = /^([\s\S]*?)([.!?\u2026]+)$/.exec(text);
const body = m ? m[1] : text;
const stop = m ? m[2] : "";
const h = (highlight ?? "").trim();
const at = h ? body.indexOf(h) : -1;
if (at < 0) return { before: body, mark: "", after: "", stop };
return { before: body.slice(0, at), mark: h, after: body.slice(at + h.length), stop };
}
// --marker-ink: text on the marker stroke. Derived from the marker's own lightness (near-black on a light
// marker, near-white on a dark one) so the swiped phrase stays readable when a theme darkens --marker.
const CSS = `
.cf-this-not-that-lines {
--tnt-bg: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 4%, var(--surface, oklch(1 0 0)));
--tnt-ink: var(--ink, oklch(0.21 0.034 263));
--tnt-muted: var(--muted, oklch(0.446 0.03 258));
--tnt-final: var(--accent, oklch(0.5 0.17 257));
--tnt-stop: currentColor;
--tnt-note: var(--muted, oklch(0.446 0.03 258));
position: relative;
overflow: clip;
background: var(--tnt-bg);
color: var(--tnt-ink);
padding-block: clamp(56px, 8vw, 112px) calc(clamp(64px, 8.5vw, 120px) + 56px);
padding-inline: clamp(16px, 5vw, 48px);
}
.cf-this-not-that-lines[data-tone="dark"] {
--tnt-bg: var(--band, oklch(0.27 0.067 256));
--tnt-ink: var(--band-ink, oklch(1 0 0));
--tnt-muted: color-mix(in oklch, var(--band-ink, oklch(1 0 0)) 66%, var(--band, oklch(0.27 0.067 256)));
--tnt-final: var(--band-ink, oklch(1 0 0));
--tnt-stop: var(--accent-fill, var(--accent, oklch(0.5 0.17 257)));
--tnt-note: var(--band-ink, oklch(1 0 0));
}
.cf-this-not-that-lines .cf-tnt__inner {
position: relative;
z-index: 1;
max-inline-size: 1120px;
min-inline-size: 0;
margin-inline: auto;
container-type: inline-size;
text-align: center;
}
.cf-this-not-that-lines .cf-tnt__stack {
margin: 0;
display: grid;
gap: clamp(2px, 0.8cqi, 12px);
min-inline-size: 0;
overflow-x: clip;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
line-height: 1.02;
}
.cf-this-not-that-lines .cf-tnt__line {
display: block;
min-inline-size: 0;
font-size: clamp(1.75rem, 6.4cqi, 5rem);
color: var(--tnt-ink);
overflow-wrap: anywhere;
hyphens: auto;
text-wrap: balance;
transform-origin: 50% 50%;
transform: none;
}
.cf-this-not-that-lines .cf-tnt__line[data-fallen="true"] {
color: var(--tnt-muted);
transform: translateY(-0.06em) scale(0.8);
}
.cf-this-not-that-lines .cf-tnt__final {
font-size: clamp(2.375rem, 8.4cqi, 6.5rem);
line-height: 1.04;
margin-block-start: clamp(16px, 3cqi, 40px);
}
.cf-this-not-that-lines .cf-tnt__final[data-landed="true"] {
color: var(--tnt-final);
}
.cf-this-not-that-lines[data-ready] .cf-tnt__line {
transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.45s ease;
}
.cf-this-not-that-lines .cf-tnt__hl {
color: var(--marker-ink, oklch(from var(--marker, #fae37c) clamp(0.18, calc((0.66 - l) * 100), 0.98) 0.01 h));
background-image: linear-gradient(transparent 14%, var(--marker, #fae37c) 14%, var(--marker, #fae37c) 94%, transparent 94%);
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
padding-inline: 0.06em;
border-radius: 0.06em;
}
.cf-this-not-that-lines .cf-tnt__stop {
display: inline-block;
transform-origin: 50% 82%;
}
.cf-this-not-that-lines .cf-tnt__final[data-landed="true"] .cf-tnt__stop {
color: var(--tnt-stop);
}
.cf-this-not-that-lines[data-ready] .cf-tnt__final[data-landed="true"] .cf-tnt__stop {
animation: cf-tnt-pulse 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s 1 both;
}
@keyframes cf-tnt-pulse {
0% { transform: scale(1); }
40% { transform: scale(1.75); }
100% { transform: scale(1); }
}
.cf-this-not-that-lines .cf-tnt__note {
margin: clamp(36px, 5cqi, 56px) auto 0;
max-inline-size: 40rem;
font-family: var(--font-body);
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
font-weight: 500;
line-height: 1.4;
color: var(--tnt-note);
text-wrap: pretty;
overflow-wrap: anywhere;
}
.cf-this-not-that-lines .cf-tnt__end {
display: block;
block-size: 0;
}
@media (prefers-reduced-motion: reduce) {
.cf-this-not-that-lines .cf-tnt__line,
.cf-this-not-that-lines[data-ready] .cf-tnt__line {
transition: none;
}
.cf-this-not-that-lines .cf-tnt__stop,
.cf-this-not-that-lines[data-ready] .cf-tnt__final[data-landed="true"] .cf-tnt__stop {
animation: none;
}
}
`;
pieces/content/this-not-that-lines/specimen.tsx 20 lines
import ThisNotThatLines from "../this-not-that-lines";
export const states = ["default"];
// Fictional sample business: Strong After Forty coaching.
export default function Specimen(_: { state?: string }) {
return (
<ThisNotThatLines
notLines={[
"Not another boot camp.",
"Not another fad diet.",
"Not another app.",
"Not another 5am grind.",
]}
finalLine="A plan you'll actually finish."
highlight="actually finish"
note="Strong After Forty is short, steady strength training built for the body you have now."
/>
);
}
| Name | Type | Details |
|---|---|---|
notLines OptionalThisNotThatLines |
string[] |
|
finalLine OptionalThisNotThatLines |
string |
|
highlight OptionalThisNotThatLines |
string |
|
note OptionalThisNotThatLines |
React.ReactNode |
|
tone OptionalThisNotThatLines |
"light" | "dark" |
|
texture OptionalThisNotThatLines |
typeof concrete |
|
still OptionalThisNotThatLines |
boolean |
|
id OptionalThisNotThatLines |
string |
|
className OptionalThisNotThatLines |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
f211b3080387e46d.webp
image/webp · 105 KB