In November 2019 I pushed the first commit of a small React library that fades elements in as you scroll, react-awesome-reveal. In the 12 months to November 1, 2026, npm counted 2,384,058 downloads of it, 67,685 of them in the final week.
In October 2026 I rewrote it from scratch. The Awesome Reveal 1.0 release post covers what shipped. This post is the inside view of rewriting an open source library with that many downloads.
Why rewrite an open source library instead of extending v4?
I wanted a lighter library that works in more than one framework, and v4 fit neither goal: it was a React-only package with Emotion as a required peer dependency.
The plan changed within hours. On October 10, 2026, the rewrite started inside react-awesome-reveal as a React-only v5. Its main commit replaced Emotion with the Web Animations API, removed the ten effect components and required React 18 or later. Less than an hour later, the repo was a pnpm workspace with a packages/core and a packages/react already named @awesome-reveal/react. The Vue and Astro adapters followed the next day.
One zero-dependency core, thin framework packages
The core has no dependencies. It wraps the Intersection Observer API and the Web Animations API, and each framework package only adapts it to a framework's lifecycle. React's useReveal and Vue's Reveal were rebuilt on the core's createReveal (#278, #279), and the core API shrank to reveal and cascade.
The size budgets live in the tests. One test bundles a fixture that imports reveal and cascade, and fails if the result reaches 1,580 bytes gzipped. Each package has limits like that.
What I removed from v4, and why
The ten effect components, from Fade to JackInTheBox, went because a native keyframe array lets the browser animate any effect without a new component. Emotion added to the bundle size, complicated server rendering and caused problems with React 19 and React Server Components. Sam Magura, then Emotion's second most active maintainer, explained in 2022 why his team moved away from runtime CSS-in-JS, partly over bundle size and server rendering. Exit animations, v4's reverse prop, went to keep the scope narrow and the library small.
What was hardest about making the library framework-agnostic?
Server rendering, and the lifecycle differences between React and Astro.
From a recovery script to a CSS-only fallback for server rendering
Server HTML has to arrive with the element hidden, or it flashes before the script runs, but it can't stay hidden if the script never runs. My first answer, on October 13, was a recovery recipe in the docs: a head script with a timeout, a data-reveal-failed rule on <html>, and a ready attribute that users set after mount. Every user had to add code, plus nonces under a strict Content Security Policy.
The same day, the packages started to ship a reveal.css that shows the elements again when JavaScript is off (@media (scripting: none)) or when you print. It needs no inline styles, so a strict CSP doesn't need 'unsafe-inline'. The next day the recipe was gone: reveal.css now holds unattached server markup for 5 seconds with pure CSS, then lets it show even if no script ever ran. The same PR renamed data-reveal to data-awesome-reveal, because Foundation 6 starts its Reveal modal on any [data-reveal] element.
The hold applies only on screen and never when the visitor prefers reduced motion. Focus inside a waiting element reveals it, even before hydration.
How React and Astro broke the shared API
The bugs came from how each framework mounts and hydrates elements. In React, a hook missed an element that a forwarded child mounted later, and Suspense or Activity replayed a finished entrance each time it showed the element again. In Astro, the HTML parser moves some tags out of the <awesome-reveal> element, such as a div inside a <p>, and that used to fail silently. One PR fixed all three: React now attaches late refs, and Astro reports a moved tag as an error in the browser.
Why react-awesome-reveal v5 re-exports the new React package
The re-export keeps the old import path. react-awesome-reveal v5 contains only export * from "@awesome-reveal/react", so you can keep importing from react-awesome-reveal, but code that uses the v4 API still has to migrate. It's the last major version of the package: it gets the 1.x updates of @awesome-reveal/react, but not version 2. The guide to migrate from v4 covers the API changes.
Why ship agent skills inside the packages?
Skills inside the package teach the agent the version you have installed. Each Awesome Reveal package has a skills directory, and the prompts in the docs tell the agent to read the skill inside the installed package. I think every public library should ship agent skills now. The AI agents guide shows how to install them, and my post on running agent skills in the browser with WebSkill explains the format.
What I'd do differently, and what comes next
I'd go modular from the first commit instead of starting with a React-only v5. Zero dependencies is a bonus, possible because Intersection Observer has been Baseline Widely available since September 2021 and the Web Animations API since March 2023, the shift I wrote about in Baseline 2026.
One more lesson I'd pass on: be the first user of your own library. It shows you what to ship and keeps you away from distractions.
Svelte, Solid and Angular come next. If Solid is new to you, start with my first look at SolidJS 2.0 for React developers. To try Awesome Reveal, read the getting started guide.
Top comments (0)