# react-dragon-curve

> Heighway dragon drawn in React

Latest version **1.0.0** (published 2019-07-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-dragon-curve
pnpm add react-dragon-curve
yarn add react-dragon-curve
bun add react-dragon-curve
```

## 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.0 |
| Published | 2019-07-24 |
| First published | 2018-10-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 209.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | ajgingrich@yahoo.com |
| Maintainers | andrewgi |
| Keywords | react, heighway, dragon, curve |

## Links

- npm: https://www.npmjs.com/package/react-dragon-curve
- Repository: https://github.com/ajGingrich/react-dragon-curve
- Homepage: https://github.com/ajGingrich/react-dragon-curve#readme
- Issues: https://github.com/ajGingrich/react-dragon-curve/issues
- npm.io page: https://npm.io/package/react-dragon-curve

## Dependencies (4)

- [konva](https://npm.io/package/konva.md) ^3.2.5
- [react](https://npm.io/package/react.md) ^16.8.4
- [react-dom](https://npm.io/package/react-dom.md) ^16.8.4
- [react-konva](https://npm.io/package/react-konva.md) ^16.8.7-2

## 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.0 (latest) — 2019-07-24
- 0.0.9 — 2019-05-31
- 0.0.8 — 2019-05-04
- 0.0.7 — 2019-05-04
- 0.0.6 — 2019-05-04
- 0.0.5 — 2019-05-03
- 0.0.4 — 2018-12-07
- 0.0.3 — 2018-12-07
- 0.0.2 — 2018-12-07
- 0.0.1 — 2018-10-15

## README

React component for a Heighway Dragon dragon curve

# React Dragon Curve

![npm version](https://img.shields.io/npm/v/react-dragon-curve.svg)
![npm Downloads](https://img.shields.io/npm/dt/react-dragon-curve.svg)
![license](https://img.shields.io/npm/l/react-dragon-curve.svg)

## Installation

```
npm install react-pgn-viewer --save

```

## Usage

Add this style or similar to your project
```
  .konvajs-content {
    border: 3px solid #e02626;
    background-color: #000814;
  }
```
then

```
import DragonCurve from 'react-dragon-curve'

class Example extends React.Component {
  render() {
    return (
      <DragonCurve
        height={600}
        width={600}
        controlClassnames={{
          controlContainer: 'button-container',
          controlStart: 'btn btn-primary',
          controlReset: 'btn btn-warning',
          controlPause: 'btn btn-warning',
        }}
        strokeWidth={2}
        strokeColor={'#d3dee2'}
        lineLength={25}
        animationSpeed={1500}
      />
    )
  }
}
```

## Properties

This library uses [react-konva](https://github.com/konvajs/react-konva) for the canvas and drawing and shares a few props.

| Prop | Type | Default | Explanation |
| --- | :---: | :------: | :-------: |
| height | number (px) | 600 | Height of background canvas |
| width | number (px) | 600 | Width of background canvas|
| strokeColor | string (hex) | '#d3dee2' | Line Color |
| strokeWidth | number (px) | 2 | Line Width |
| lineLength | number (px) | 50 | Length of each individual line |
| animationSpeed | number (ms) | 1000 | Animation duration in between each iteration in ms |
| controlClassnames | object | { controlContainer: '', controlStart: '', controlReset: '', controlPause: '' } | classnames for the control buttons |

## Demo

To be added

## Contributing

To run the example:

```
npm install
npm run build
npm run dev
```

Then open `localhost:8000` in a browser.

Tested with React 16.6

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