Revealing Effects
Overview
React Awesome Reveal provides a rich set of pre-built animation components inspired by Animate.css. These components automatically animate their children when they enter the viewport, creating engaging scroll experiences with minimal code.
Available Effects
Choose from these powerful animation components:
Effect | Description | Best Used For |
---|---|---|
Fade | Smooth opacity transition | Text, images, cards |
Slide | Slides in from a direction | Lists, navigation items |
Bounce | Bouncy entrance animation | Call-to-action buttons |
Flip | 3D flip animation | Cards, reveals |
Rotate | Rotation entrance | Icons, badges |
Zoom | Scale transition | Modal windows, highlights |
Roll | Rolling entrance | Playful elements |
JackInTheBox | Pop-out animation | Attention-grabbing elements |
Hinge | Swinging fall animation | Exit animations |
Basic Usage
Wrap your content with any effect component:
Customization Options
Fine-tune your animations with these props:
Direction Control
Timing and Triggers
Cascade Effects
The cascade
prop animates children one after another, with a delay between each item. Use damping
to control the delay:
Animation Props Reference
All animation components accept these common props:
Prop | Type | Default | Description |
---|---|---|---|
direction | "up" | "down" | "left" | "right" | Varies | Animation direction |
delay | number | 0 | Delay before animation (ms) |
duration | number | 1000 | Animation duration (ms) |
fraction | number | 0 | Viewport fraction to trigger |
triggerOnce | boolean | false | Animate only once |
cascade | boolean | false | Cascade to children |
damping | number | 0.5 | Delay between cascaded items |
Best Practices
- Performance: Use
triggerOnce
for elements that donβt need to re-animate - Mobile: Keep animations subtle on mobile devices
- Accessibility: Ensure animations respect user preferences with
prefers-reduced-motion
- Timing: Use appropriate delays and durations for your content type
Examples
Here are some common use cases: