# Awesome Reveal 1.0: scroll animations for React, Vue and Astro

> Awesome Reveal 1.0 adds scroll reveal animations to React, Vue, Astro and JavaScript, with native browser APIs, no dependencies and reduced motion support.

Awesome Reveal 1.0 is out. It animates elements as they scroll into view: wrap an element in `Reveal`, and it fades in when it enters the viewport. It now works in React, Vue, Astro and plain JavaScript, and its core has no dependencies.

* **New to Awesome Reveal?** [Try the demos](#scroll-reveal-demos), then [add it to your project](#add-scroll-animations-in-react-vue-astro-or-javascript).
* **Coming from `react-awesome-reveal` v4?** Read [what changed](#what-changed-from-react-awesome-reveal-v4), then follow the [Migrate from v4](/guides/migrate-from-v4/) guide.

## Scroll reveal demos

Pick an entrance. The replay button plays it again, and the tabs show the code for each framework.

[`Cascade`](/guides/lists/) reveals its direct children one after another. Pick the interval between two children:

If your system asks for reduced motion, the demos show the content at once, with no animation.

## Add scroll animations in React, Vue, Astro or JavaScript

Install the package for your framework:

* React

  ```shell
  pnpm add @awesome-reveal/react
  ```

* Vue

  ```shell
  pnpm add @awesome-reveal/vue
  ```

* Astro

  ```shell
  pnpm add @awesome-reveal/astro
  ```

* JavaScript

  ```shell
  pnpm add @awesome-reveal/core
  ```

Then wrap an element in `Reveal`. With `@awesome-reveal/core`, call `reveal()` instead.

* React

  ```jsx
  import { Reveal } from "@awesome-reveal/react";

  export function HeroTitle() {
    return (
      <Reveal>
        <h1>Hello</h1>
      </Reveal>
    );
  }
  ```

* Vue

  ```vue
  <script setup>
  import { Reveal } from "@awesome-reveal/vue";
  </script>

  <template>
    <Reveal>
      <h1>Hello</h1>
    </Reveal>
  </template>
  ```

* Astro

  ```astro
  ---
  import { Reveal } from "@awesome-reveal/astro";
  ---

  <Reveal>
    <h1>Hello</h1>
  </Reveal>
  ```

* JavaScript

  ```js
  import { reveal } from "@awesome-reveal/core";

  reveal("h1");
  ```

When the element enters the viewport, it fades in and moves up 24 pixels. The [Get started](/getting-started/) page covers every step and the [requirements](/getting-started/#requirements). For framework setup, see the [Next.js](/frameworks/nextjs/), [Vue SSR and Nuxt](/frameworks/vue-ssr-nuxt/) and [Astro](/frameworks/astro/) pages.

## Why Awesome Reveal 1.0 is a rewrite

`react-awesome-reveal` v4 worked only in React. It built its CSS animations with Emotion and had one component per effect: `Fade`, `Slide`, `Zoom` and more. It already used the Intersection Observer API to find elements that enter the viewport. Today, the Web Animations API can play the entrance too, so the library doesn’t need CSS-in-JS anymore.

So I rewrote it on these two browser APIs:

* **One core for every framework.** The React, Vue and Astro packages share the same core, so the options and the animations behave the same everywhere.
* **A smaller API.** `Reveal` and `Cascade` replace the effect components, and the `from` option picks the entrance.
* **No dependencies.** The core doesn’t use Emotion or any other package.

The new packages are published as `@awesome-reveal/*`, and `react-awesome-reveal` v5 re-exports `@awesome-reveal/react`.

## Why choose Awesome Reveal

### A small core with no dependencies

With `reveal()` and `cascade()`, `@awesome-reveal/core` adds less than 2 kB gzipped to your bundle. The measurement doesn’t include the React, Vue and Astro packages. Here’s [how I measure the size](/concepts/performance/#bundle-size).

### The same API in React, Vue and Astro

Each framework package has a `Reveal` and a `Cascade`, and the JavaScript package has the `reveal()` and `cascade()` functions. The entrance and viewport options, such as `from`, `duration` and `threshold`, have the same names and defaults in every package. The [Options](/reference/options/#where-you-can-use-each-option) page shows where each option works. The [React API](/reference/react/), [Vue API](/reference/vue/), [Astro API](/reference/astro/) and [JavaScript API](/reference/javascript/) pages list the hooks, directives and functions of each one.

### Fade, slide, zoom and blur entrances

The [`from`](/reference/options/#from) option sets where the entrance starts. A side, such as `"left"`, fades the element in and moves it 24 pixels. An object gives you a zoom, a rotation or a blur:

```jsx
import { Reveal } from "@awesome-reveal/react";

<Reveal from="left">Slide in from the left</Reveal>;
<Reveal from={{ opacity: 0, scale: 0.8 }}>Zoom in</Reveal>;
<Reveal from={{ opacity: 0, blur: 8 }}>Blur in</Reveal>;
```

Need another effect? Pass an array of [native keyframes](/guides/keyframes/). The [Choose the entrance](/guides/entrances/) guide has more examples.

### Server rendering, accessibility and performance

* **Server rendering.** The React, Vue and Astro packages hide the content in the server HTML, so it doesn’t flash before the script runs. If no script attaches the element within 5 seconds, the content shows anyway. See [Server rendering without a flash](/concepts/server-rendering/).
* **Reduced motion.** If the user asks for reduced motion, the content shows at once, with no animation.
* **Keyboard focus and print.** Content shows when it gets the keyboard focus, and when you print the page. See [Accessible scroll animations](/concepts/accessibility/).
* **Smooth animations.** No code listens to scroll events, and the default entrances animate only properties that the compositor runs. See [Scroll animation performance](/concepts/performance/).

### Manual control, agent skills and TypeScript

* **Manual control and events.** In React, Vue and Astro, the `when` option reveals an element from your own state, and a reveal event runs your code when the element reveals. See [Trigger reveal animations manually](/guides/manual-control/) and [Run code when an element reveals](/guides/reveal-events/).
* **Skills for coding agents.** Each package includes skills for coding agents, such as Claude Code or Codex. For example, the migration skill tells the agent to replace the v4 `cascade` prop with `Cascade`, and to set `interval` to the v4 `duration * damping`. See [AI coding agent skills and llms.txt](/guides/ai-agents/).
* **TypeScript and ES modules.** The packages include their own TypeScript types, and they’re ES modules only.

## When to choose Awesome Reveal

Awesome Reveal fits landing pages, marketing sites, docs and other content pages that need entrance animations and staggered lists. By default, each entrance plays once, when the element scrolls into view. The [`when`](/guides/manual-control/#play-the-entrance-again) option can play it again. For animations linked to the scroll position, use [CSS scroll-driven animations](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Scroll-driven_animations). For exit animations and timelines of many steps, use a general animation library.

## What changed from react-awesome-reveal v4

Version 1.0 changes the API on purpose. Here are the main changes for React code:

| react-awesome-reveal v4                       | Awesome Reveal 1.0                            |
| --------------------------------------------- | --------------------------------------------- |
| `Fade`, `Slide`, `Zoom` and the other effects | `Reveal`, with `from` or native `keyframes`   |
| Emotion `keyframes`                           | Native keyframe objects                       |
| The `cascade` prop                            | The `Cascade` component                       |
| `damping`                                     | `interval` on `Cascade`, in milliseconds      |
| `fraction`                                    | `threshold`                                   |
| `triggerOnce`                                 | Removed. By default, the entrance plays once. |
| `onVisibilityChange`                          | `onReveal`                                    |
| A `duration` of 1000 milliseconds             | A `duration` of 600 milliseconds              |
| `reverse`                                     | Removed. Version 1.0 has no exit animations.  |

`Reveal` also renders one element around its children, and one observer watches that element. Version 4 wrapped each element child in a `div`.

To upgrade, install `@awesome-reveal/react`, or `react-awesome-reveal` v5 if you want to keep the old import path. [Choose the package](/guides/migrate-from-v4/#choose-the-package) compares the two. The [Migrate from v4](/guides/migrate-from-v4/) guide goes through each step, with the v4 position of each effect. The [v4 docs](/v4/) stay online.

## Get started with Awesome Reveal

Start with the [Get started](/getting-started/) page. It also has a prompt that you can give your coding agent, so it adds the animations for you.

The code is on [GitHub](https://github.com/awesome-reveal/awesome-reveal), under the MIT license. I’d like to hear what works and what doesn’t, so tell me in [GitHub Discussions](https://github.com/awesome-reveal/awesome-reveal/discussions). To follow the next updates, subscribe to the [RSS feed of this blog](/blog/rss.xml).
