cor

@animini/core

small animation lib

Showing:

Popularity

Downloads/wk

33

GitHub Stars

6

Maintenance

Last Commit

5mos ago

Contributors

1

Package

Dependencies

1

Size (min+gzip)

2.1KB

License

Type Definitions

Tree-Shakeable

Yes?

Categories

Readme

npm (tag) npm bundle size

Installation

For the DOM

yarn add @animini/dom

For Three

yarn add @animini/three

Instructions

import { useDrag } from 'react-use-gesture'
import { useAnimini, spring } from '@animini/dom'

export default function App() {
  const [ref, api] = useAnimini(spring) // leave useAnimini() to use default Lerp

  useDrag(
    ({ active, movement: [x, y] }) => {
      api.start({ scale: active ? 1.2 : 1, x: active ? x : 0, y: active ? y : 0 }, (k) => ({
        immediate: k !== 'scale' && active,
      }))
    },
    { domTarget: ref }
  )

  return <div ref={ref} />
}

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100