Socket
Book a DemoInstallSign in
Socket

@leva-ui/plugin-bezier

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leva-ui/plugin-bezier

### Installation

latest
Source
npmnpm
Version
0.10.0
Version published
Weekly downloads
741
30%
Maintainers
2
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 22 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts