Skip to content

Repository files navigation

React Particles JS npm versionLicense: MITKnown 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.jsimportReactfrom'react';importReactDOMfrom'react-dom';import{Particles}from'@blackbox-vision/react-particles';constParticlesJs=()=>(<Particlesid="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.

About

🎉Blazing fast ParticlesJS wrapper for ReactJS

Topics

Resources

Contributing

Stars

16 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages