A Typescript implementation of a bezier editor React component for the CSS easing function. Click and drag the knobs to visually modify your beziers!
If you like this, please give the project a GitHub 🌟
Check out the live Storybook instance for a demo and docs of all the props.
npm install ts-bezier-easing-editor
- Import the
BezierEditor
component
import { BezierEditor } from 'ts-bezier-easing-editor';
- Now you can use the editor component in your tsx
<BezierEditor {[...props]}></BezierEditor>
Check out example/App.tsx for a simple example
- Configure for extended Y coordinates
- Improve test coverage
- Fix position calculation with CSS zoom applied
- Support auto resize
- Support linear() and step() views
If you wish to fork the repo, after installing the deps, you can run these scripts:
Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.
Note: This runs the App files in example/ as the dev environment.
The page will reload if you make edits. You will also see any lint errors in the console.
Runs tests in Jest
Formats everything with Prettier
Using vite-build.config.ts
, compiles and exports the TS library into dist/main.js
and dist/main.d.ts
.
Starts up a Storybook server on http://localhost:6006
Builds a static web app version of Storybook to /storybook-static