1.2.0 • Published 5 years ago

@blackbox-vision/react-particles v1.2.0

Weekly downloads
14
License
MIT
Repository
github
Last release
5 years ago

React Particles JS npm version License: MIT Known Vulnerabilities

🎉Blazing fast ParticlesJS wrapper for ReactJS. Check out the demo.

Install

You can install this library via NPM or YARN.

NPM

npm i @blackbox-vision/react-particles

YARN

yarn add @blackbox-vision/react-particles

Usage

The usage is really simple:

// App.js
import React from 'react';
import ReactDOM from 'react-dom';
import { Particles } from '@blackbox-vision/react-particles';

const ParticlesJs = () => (
  <Particles
    id="simple"
    width="auto"
    height="100vh"
    style={{
      backgroundColor: 'blue',
    }}
    params={{
      particles: {
        number: {
          value: 50,
        },
        size: {
          value: 3,
        },
      },
      interactivity: {
        events: {
          onhover: {
            enable: true,
            mode: 'repulse',
          },
        },
      },
    }}
  />
);

ReactDOM.render(<ParticlesJs />, document.getElementById('root'));

Props

Particles rely on the following props:

PropertiesTypesDefault ValueDescription
idstringparticles-jsDetermines wheter to render Particles.
paramsobject-----Determines the configuration for Particles JS.
styleobject{}Determines the styles for the Particles container.
widthstringautoDetermines the width for the Particles container.
heightstring100vhDetermines the height for the Particles container.
classNamestring-----Determines a custom className to apply to Particles container.
withDefaultsbooleantrueDetermines if should merge values from params with lib defaults.

Issues

Please, open an issue following one of the issues templates. We will do our best to fix them.

Contributing

If you want to contribute to this project see contributing for more information.

License

Distributed under the MIT license. See LICENSE for more information.

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.0.1

5 years ago