Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@leva-ui/plugin-bezier

pmndrs1.9kMIT0.10.0TypeScript support: included

Installation

readme

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 }} />
}

changelog

@leva-ui/plugin-bezier

0.10.0

Minor Changes

  • 3d4a620: feat!: React 18 and 19 support

Patch Changes

  • Updated dependencies [b9c6376]
  • Updated dependencies [3d4a620]

0.9.19

Patch Changes

  • 3177e59: style: label alignment
  • Updated dependencies [3177e59]

0.9.18

Patch Changes

  • e45e9de: Feat: pass get function to Button and ButtonGroup
  • Updated dependencies [e45e9de]

0.9.14

Minor Changes

  • 1001f25: Fix version for stitches before moving to 1.x

0.9.12

Patch Changes

0.9.10

Patch Changes

  • 16e3c14: feat: add preview flag to disable dot preview.
  • Updated dependencies [16e3c14]

0.9.8

Patch Changes

  • f8f7b57: fix: double render issue when using nested components.
  • Updated dependencies [f8f7b57]

0.0.4

Patch Changes

  • 0511799: styles: remove manual 'leva__' prefix from stitches styles.
  • Updated dependencies [0511799]

0.0.3

Patch Changes

  • 26ead12: Feat: add cssEasing to returned prop

0.0.2

Patch Changes

  • c997410: Plugin: add the Bezier plugin

    import { bezier } from '@leva-ui/plugin-bezier'
    useControls({ curve: bezier([0.25, 0.1, 0.25, 1]) })
  • Updated dependencies [c997410]