react-awesome-reveal
v5.0.0
Published
Reveal-on-scroll animations for React. This package re-exports @awesome-reveal/react.
Maintainers
Readme
react-awesome-reveal
Reveal-on-scroll animations for React. Version 5 re-exports @awesome-reveal/react, so v4 users can upgrade with no new package name.
Install
npm install react-awesome-revealFor a new project, install @awesome-reveal/react instead. The two packages give the same API.
Quick start
import { Reveal } from "react-awesome-reveal";
export const Hero = () => (
<Reveal from="left">
<h1>Hello</h1>
</Reveal>
);The package gives Reveal, Cascade, useReveal, useCascade and their types. Read the @awesome-reveal/react README for the full API and the steps to migrate from v4. Version 5 changes the API on purpose, so v4 code needs these steps.
Stylesheet setup
The package loads its stylesheet automatically. Two setups need a step:
- Astro island. Import
react-awesome-reveal/reveal.cssin the page or in the layout that renders the island. - Next.js Pages Router with webpack. Add
@awesome-reveal/reacttotranspilePackagesin the Next.js config. That package imports the stylesheet.
Agent skills
The package includes the migrating-from-v4 skill, which helps a coding agent migrate your code. pnpm can link it into your project after you approve it.
