@dvlpralamin/star-field
v1.0.3
Published
A Simple star field background animation
Downloads
13
Maintainers
Readme
star-field
Installation
npm i @dvlpralamin/star-field
Basic Usage
import React from 'react';
import ReactDOM from 'react-dom';
import StarField from "@dvlpralamin/star-field";
const App = () => {
return (
<StarField/>
);
};
ReactDOM.render(<App />, document.getElementById('root'));
With Props
import React from 'react';
import ReactDOM from 'react-dom';
import StarField from "@dvlpralamin/star-field";
const App = () => {
return (
<StarField duration={4000} fixed colors={["#ff0000", "#ff00ff", "#00ff00", "#0000ff"]} />
);
};
ReactDOM.render(<App />, document.getElementById('root'));
Props
fixed
:Boolean
. This Props make animation fixed on screen defaultfalse
duration
:Number
. Animation duration. default3000
ms.colors
:Array
.