# Get started with scroll animations

> Install Awesome Reveal for React, Vue, Astro or JavaScript, reveal your first element on scroll, and animate the items of a list one after the other.

Awesome Reveal animates elements when they scroll into view. Each framework package uses the same core. The core uses the [Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) and the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API) of the browser, and it has no dependencies.

## Requirements

| Framework  | Framework version | Node.js        |
| ---------- | ----------------- | -------------- |
| React      | 18 or 19          | 20.19 or later |
| Vue        | 3.5 or later      | 20.19 or later |
| Astro      | 6 or 7            | 22.12 or later |
| JavaScript |                   | 20.19 or later |

The packages are ES modules only. They include their TypeScript types.

## Install the package

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
  ```

With npm, yarn or bun, use `npm install`, `yarn add` or `bun add`, followed by the package name.

## Reveal an element

Wrap the element in `Reveal`. With `@awesome-reveal/core`, call `reveal()` with a CSS selector, an element or a list of elements.

* 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](/guides/entrances/#slide-in-from-a-side). The entrance [plays one time](/guides/manual-control/#play-the-entrance-again). You do not import a stylesheet.

## Animate a list

[`Cascade`](/guides/lists/) reveals its direct children one after the other. The [`interval`](/reference/options/#interval) option sets the time between the start of two children, in milliseconds. The default is 80.

* React

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

  export function FeatureList() {
    return (
      <Cascade as="ul" interval={120}>
        <li>Small</li>
        <li>Native</li>
        <li>Accessible</li>
      </Cascade>
    );
  }
  ```

* Vue

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

  <template>
    <Cascade as="ul" :interval="120">
      <li>Small</li>
      <li>Native</li>
      <li>Accessible</li>
    </Cascade>
  </template>
  ```

* Astro

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

  <Cascade as="ul" interval={120}>
    <li>Small</li>
    <li>Native</li>
    <li>Accessible</li>
  </Cascade>
  ```

* JavaScript

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

  cascade("ul.features", { interval: 120 });
  ```

## What happens when the page loads

* The React, Vue and Astro packages render the element as hidden in the server HTML, so the element [does not flash](/concepts/server-rendering/) before the script runs. Hydrate the reveal content eagerly. See [The 5 second hold](/concepts/server-rendering/#the-5-second-hold).
* `@awesome-reveal/core` [does not hide content](/concepts/server-rendering/#the-javascript-api) before your script calls `reveal()`.
* If the user asks for [reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-reduced-motion), the content shows at once, with [no animation](/concepts/accessibility/#reduced-motion).
* In [older browsers](/reference/browser-support/#older-browsers), the content does not stay hidden.

> **React or Vue in an Astro island**
>
> Hydrate the island with `client:load`, not `client:visible`. Import `@awesome-reveal/react/reveal.css` or `@awesome-reveal/vue/reveal.css` in the Astro page or layout. See [React or Vue in Astro](/frameworks/react-vue-astro/).

## Next steps

* [Choose the entrance](/guides/entrances/): fade and slide in from a side, or zoom, rotate and blur.
* [Options](/reference/options/): all the options, with their types and default values.
* Frameworks: add scroll animations to [React](/frameworks/react/), [Next.js](/frameworks/nextjs/), [Vue](/frameworks/vue/), [Vue SSR and Nuxt](/frameworks/vue-ssr-nuxt/), [Astro](/frameworks/astro/) or [plain JavaScript](/frameworks/javascript/).
