Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vincecao/animated-in-view

Animate elements when they are showing on view
https://github.com/vincecao/animated-in-view

animation framer-motion react-spring

Last synced: 17 days ago
JSON representation

Animate elements when they are showing on view

Awesome Lists containing this project

README

        

# Animated in view

Make experiments with different libraries for component appearing animations.


npm version


GitHub version

[Check live demo here](https://animated-in-view.vercel.app)

### Installation
```bash
npm i @vincecao/animated-in-view
yarn add @vincecao/animated-in-view
pnpm i @vincecao/animated-in-view
```

### Props
- `animateDisabled`: boolean = `false`
- `distance`: number = `100`
- `delay`: number = `200`
- `duration`: number = `600`
- `type`: `"fade" | "slide-bottom-to-top" | "slide-left-to-right" | "slide-right-to-left" | "slide-top-to-bottom"`

### Usage
```tsx
// animate image element using React Spring

// animate div element using React spring
...

// animate image element using Framer Motion

// animate div element using Framer Motion
...

// animate image element using React Transition Group

// animate div element using React Transition Group
...

// animate image element using GSAP

// animate div element using GSAP
...
```

### Animation libraries in examples
- [React Spring](https://www.react-spring.dev/)
- [Framer Motion](https://www.framer.com/motion/)
- [React Transition Group](https://reactcommunity.org/react-transition-group/transition)
- [gsap](https://greensock.com/)