0.10.0 • Published 11 months ago

@leva-ui/plugin-bezier v0.10.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Leva Bezier

Installation

npm i @leva-ui/plugin-bezier

Quick start

import { useControls } from 'leva'
import { bezier } from '@leva-ui/plugin-bezier'

function MyComponent() {
  const { curve } = useControls({ curve: bezier() })
  // or
  const { curve } = useControls({ curve: bezier([0.54, 0.05, 0.6, 0.98]) })
  // or
  const { curve } = useControls({ curve: bezier('in-out-quadratic') })
  // or
  const { curve } = useControls({ curve: bezier({ handles: [0.54, 0.05, 0.6, 0.98], graph: false }) })

  // built-in function evaluation
  console.log(curve.evaluate(0.3))

  // inside a css like animation-timing-function
  return <div style={{ animationTimingFunction: value.cssEasing }} />
}
0.10.0

11 months ago

0.9.19

4 years ago

0.9.18

4 years ago

0.9.14

4 years ago

0.9.12

5 years ago

0.9.10

5 years ago

0.9.9

5 years ago

0.9.7

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago