1.1.1 • Published 4 years ago

react-canvas-nest v1.1.1

Weekly downloads
39
License
MIT
Repository
github
Last release
4 years ago

React-Canvas-Nest

NPM version GitHub license npm bundle size (minified + gzip)

English | 简体中文

React component for a nest backgroud.

Creativity is inspired by canvas-nest.js

screenshot

Install

# use yarn
yarn add react-canvas-nest

# or use npm
npm install react-canvas-nest

Usage

Note:

  • You can refer to this example.
  • Component size depends on parent node size.

Import Component

import ReactCanvasNest from 'react-canvas-nest';

Use Component

  • Default
    <ReactCanvasNest />
  • Custom

    <ReactCanvasNest className = 'canvasNest' config = {{ pointColor: ' 255, 255, 255 ' }} style = {{ zIndex: 99 }} />

API

className

Support className attribute

config

PropertyDescriptionDefault
countcount of points88
pointRradius of the point1
pointColor114, 114, 114
pointOpacitytransparency of points1
distmaximum distance between two point6000
lineColor0, 0, 0
lineWidthmultiple of line width1
followmouse followtrue
mouseDistdistance between point and mouse20000

style

Support style attribute, default style as follows:
PropertyDefault
zIndex-1
opacity1
displayblock
positionabsolute

Related projects

License

React-Canvas-Nest is MIT licensed.

1.1.1

4 years ago

1.1.1-beta.0

4 years ago

1.1.0

4 years ago

1.0.10

5 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago