About
A paragraph that arrives on the wind. A tornado made of its own letters travels along the lines, flinging each letter into place in reading order, so the text writes itself in a storm. Point at a sentence and its letters lift into a small twister that follows the pointer.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Whirlwind to your project and fits it to your theme.
Code
How Whirlwind is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import type { ReactNode } from "react";
import { Whirlwind } from "@/components/ui/whirlwind";
const settings = {
duration: 3.2,
width: 0.22
};
/* The demo's Google Fonts. In a Next.js app, use next/font/google instead. */
if (typeof document !== "undefined" && !document.getElementById("whirlwind-fonts")) {
const style = document.createElement("style");
style.id = "whirlwind-fonts";
style.textContent = "@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@100..900&family=Newsreader:wght@200..800&display=swap'); .rh-inter-tight { font-family: 'Inter Tight', sans-serif; } .rh-newsreader { font-family: 'Newsreader', serif; }";
document.head.appendChild(style);
}
/** A gentle entrance: rises and fades in, a beat after `delay` seconds. */
function Rise({ children, delay = 0, className = "" }: { children: ReactNode; delay?: number; className?: string }) {
return (
<div className={className} style={{ animation: `rh-rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) ${delay}s both` }}>
<style>{`@keyframes rh-rise { from { opacity: 0; transform: translateY(28px); } } @media (prefers-reduced-motion: reduce) { @keyframes rh-rise { from { opacity: 0; } } }`}</style>
{children}
</div>
);
}
const serif = { className: "rh-newsreader", style: { fontFamily: "'Newsreader', serif" } };
const type = { className: "rh-inter-tight", style: { fontFamily: "'Inter Tight', sans-serif" } };
// Kept outside the component, so the text isn't split again on every render.
const ESSAY = `The wind never asks where you were going. It takes the hat, the map, the letter you meant to post, and sets them down somewhere you would never have thought to look.
We spent a year following it across the plains with a notebook and a kite. These are the field notes, in the order the weather gave them to us.`;
function DemoContent(props: Partial<typeof settings> = {}) {
const v = { ...settings, ...props };
return (
<main className={`${type.className} min-h-svh overflow-hidden bg-[#e6ebef] px-[6vw] pt-[clamp(8rem,26vh,16rem)] pb-[14vh] text-[#1b222d]`}>
<div className="mx-auto max-w-[56rem]">
<Rise>
<p className="text-[15px] font-medium text-[#1b222d]/70">Field Notes on Wind, chapter one</p>
</Rise>
<Whirlwind key={`${v.duration}${v.width}`} text={ESSAY} duration={Number(v.duration)} width={Number(v.width)} className={`${serif.className} mt-6 cursor-default text-[clamp(1.45rem,2.9vw,2.6rem)] leading-[1.22] tracking-[-0.01em]`} />
<Rise delay={0.4}>
<p className="mt-12 text-[15px] text-[#1b222d]/65">Point at a sentence to stir it up.</p>
</Rise>
</div>
</main>
);
}
/** The demo in its own colours, filling the frame. */
export default function Demo(props: Partial<typeof settings> = {}) {
return (
<div className="min-h-svh w-full" style={{ background: "#e6ebef" }}>
<DemoContent {...props} />
</div>
);
}
















