npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bezier-easing-editor

v1.1.0

Published

Cubic Bezier Curve editor made with React & SVG

Downloads

2,670

Readme

bezier-easing-editor

Cubic Bezier Curve editor made with React & SVG.

npm CI

Example

(click to open)

Install

npm install bezier-easing-editor

Requires React 17 or higher. TypeScript types are included.

Usage

Controlled

Provide value and an onChange handler:

import { useState } from "react";
import BezierEditor, { type BezierValue } from "bezier-easing-editor";

function MyEditor() {
  const [value, setValue] = useState<BezierValue>([0.25, 0.25, 0.75, 0.75]);
  return <BezierEditor value={value} onChange={setValue} />;
}

Uncontrolled

Just define a defaultValue:

<BezierEditor defaultValue={[0.2, 0.2, 0.8, 0.8]} onChange={console.log} />

Props

| Prop | Type | Default | Description | | --- | --- | --- | --- | | value | [x1, y1, x2, y2] | — | current easing (controlled mode) | | defaultValue | [x1, y1, x2, y2] | [0.25, 0.25, 0.75, 0.75] | initial easing (uncontrolled mode) | | onChange | (value) => void | — | called when a handle is dragged | | width | number | 300 | svg width in pixels | | height | number | 300 | svg height in pixels | | padding | [top, right, bottom, left] | [25, 5, 25, 18] | padding around the grid | | progress | number | 0 | progress in [0,1] to visualize on the curve | | readOnly | boolean | false | hide the handles and disable edition | | background | string | "#fff" | background color | | gridColor | string | "#eee" | grid color | | curveColor | string | "#333" | curve color | | curveWidth | number | 2 | curve stroke width | | handleColor | string | "#f00" | handle color | | handleRadius | number | 5 | handle circle radius | | handleStroke | number | 2 | handle stroke width | | progressColor | string | "#ccc" | progress lines color | | textStyle | CSSProperties | sans-serif 10px | style of the axis labels | | style / className | — | — | applied to the root svg | | children | ReactNode | — | extra SVG elements rendered in the editor |

Development

npm install
npm test          # run the test suite (vitest)
npm run build     # build the library (tsup: ESM + CJS + types)

cd example
npm install
npm run dev       # run the example app (vite)

The example app is deployed to GitHub Pages automatically on every push to master by the deploy workflow.

Release

Releases are automated with changesets. Run npx changeset in your PR to describe the change and pick a semver bump. On merge, the release workflow opens a "Version Packages" PR; merging it publishes to npm (via trusted publishing, no token) and creates the GitHub release.

See also