About
A two-line serif headline whose words fill from pale to ink as you scroll, with optional photo objects (a paper plane and a compass in the demo) drifting and turning past at their own speed. A quiet statement section between busier blocks.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Scroll Fill Headline to your project and fits it to your theme.
Code
How Scroll Fill Headline is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { ScrollFillHeadline } from "@/components/ui/scroll-fill-headline"
const IMG = "https://cdn.jsdelivr.net/gh/rm-sjent/21st-assets@v1/img/"
export default function ScrollFillHeadlineDemo() {
return (
<div className="w-full bg-white" style={{ fontFamily: "Geist, ui-sans-serif, system-ui, sans-serif" }}>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@300..600&family=Newsreader:ital,opsz,wght@0,6..72,300..500;1,6..72,300..400&display=swap" precedence="default" />
<style>{`.font-serif{font-family:"Newsreader","Iowan Old Style","Palatino Linotype",Georgia,serif}`}</style>
<div className="flex h-[50vh] items-end px-6 pb-8 md:px-12"><p className="text-[15px] text-black/55">Scroll down</p></div>
<ScrollFillHeadline
lines={["A small firm", "with a partner on every file"]}
objects={[
{ src: `${IMG}object-plane.jpg`, left: 74, top: 8, width: 190, rotate: [-8, 10], drift: [60, -80] },
{ src: `${IMG}object-compass.jpg`, left: 8, top: 50, width: 150, rotate: [12, -14], drift: [40, -60] },
]}
/>
<div className="h-[50vh]" />
</div>
)
}
















