Approch 2: Using the slide Effect
The slide effect allows you to visually animate elements. You can control the slide direction and distance. Here’s an example:
Javascript
import React from 'react' ; import Slide from 'react-reveal/Slide' ; const App = () => { return ( <div> <Slide right> <h1>Sliding Heading</h1> </Slide> </div> ); }; export default App; |
Output:
Approach 3: Combining Animation and Sequence
React Reveal also supports combining multiple animations and creating complex sequences. This allows you to set multiple animations to achieve more dynamic effects. Here’s an example:
Javascript
import React from 'react' ; import { Fade, Rotate } from 'react-reveal' ; const App = () => { return ( <div> <Fade> <h1>Geeks For Geeks</h1> </Fade> <Rotate> <p>Rotating Paragraph</p> </Rotate> </div> ); }; export default App; |
Output:
Exploring React Reveal: Creating Stunning Animations in React
React Reveal is an animation library for React. In this article, we will see few of the implementation of this library and learn more about it.
We will discuss the following two approaches:
Table of Content
- Using the Fade Effect
- Using the slide Effect