Skip to content

React components to draw different types of curves with svg

License

Notifications You must be signed in to change notification settings

pomber/react-svg-curve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

68316f6 · Apr 24, 2020

History

19 Commits
Apr 19, 2020
Apr 20, 2020
Apr 20, 2020
Apr 16, 2020
Apr 20, 2020
Apr 24, 2020
Apr 20, 2020
Apr 16, 2020
Apr 18, 2020

Repository files navigation

react-svg-curve

React components to draw different types of curves with svg. It wraps all the curve paths from d3-shape.

Install

npm install react-svg-curve

Use

import { BasisCurve } from 'react-svg-curve';

function App() {
  return (
    <svg width="100" height="40">
      <BasisCurve
        data={[
          [0, 10],
          [50, 35],
          [100, 0],
        ]}
      />
    </svg>
  );
}

BasisCurve is one of many types of curves available. Go to the demo on codesandbox to see all the curves and options.