# react-bezier

> Small and simple library for ReactJs for plotting bezier curves

Latest version **1.0.1** (published 2020-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-bezier
pnpm add react-bezier
yarn add react-bezier
bun add react-bezier
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-10-28 |
| First published | 2020-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 24.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Error_256 |
| Maintainers | error-256 |
| Keywords | react, bezier, curve, line |

## Links

- npm: https://www.npmjs.com/package/react-bezier
- Repository: https://github.com/Error-256/react-bezier
- Issues: https://github.com/Error-256/react-bezier/issues
- npm.io page: https://npm.io/package/react-bezier

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-10-28
- 1.0.0 — 2020-09-06

## README

# react-bezier

Small and simple library for ReactJs for plotting bezier curves

### Install dependencies

```bash
npm install react-bezier
```

### Demo

https://error-256.github.io/react-bezier/

### Demo source codes

https://github.com/Error-256/react-bezier/tree/master/src/docs

##### Settings:

| method   | description               | default  |
| :------- | :------------------------ | :------- |
| settings | array of settings objects | required |
| arrow    | direction arrow           | **true** |

##### Settings object:

| name      | description                                                                                                                                                                                                  |
| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| from      | start id                                                                                                                                                                                                     |
| to        | end id                                                                                                                                                                                                       |
| positions | contains 2 properties: **start** and **end** responsible for display settings. **side** - the side to which the line is attached, **indent** - the indent from the edge (optional, by default in the center) |
| style     | css class                                                                                                                                                                                                    |

### Example

```js
import ReactBezier from "react-bezier";

...

const settings = [
  {
    from: "cube-1",
    to: "cube-2",
    positions: {
      start: {
        side: "bottom",
        indent: 20
      },
      end: {
        side: "top",
      },
    },
    style: "red-line",
  }
]

...

<ReactBezier settings={settings}>
  <div>
    <div id="cube-1"></div>
    <div id="cube-2"></div>
  </div>
</ReactBezier>
```

---
_Source: https://npm.io/package/react-bezier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
