1.0.2 • Published 1 year ago

react-stars-particles v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

react-stars-particles

react-stars-particles is a captivating React component that brings a dynamic and interactive galaxy background to your web pages. With stars that are attracted to the mouse pointer and smooth animations, it offers a unique and engaging user experience.

Attract stars with your mouse as you move closer to them, and watch them gracefully return to their original positions when you move away to maintain a balanced cosmic display.

Table of Contents

Install

Install react-stars-particles using npm:

npm install react-stars-particles

Usage

Integrate react-stars-particles into your React app with ease:

import { Galaxy } from 'react-stars-particles';

function App() {
  return (
    <div>
      <h1>Welcome to My Galaxy</h1>
      <Galaxy />
    </div>
  );
}

export default App;

Props

Customize your galaxy with these adjustable properties:

NameDescriptionTypeDefault
quantitySet the number of stars in the galaxyint400
attractAdjust the attraction speed of starsint0.5
repulseModify the speed stars return to defaultint0.2
colorDefine the color of the starsstring"white"

Examples

Basic Usage

import { Galaxy } from 'react-stars-particles';

function App() {
  return (
    <div>
      <h1>Welcome to My Galaxy</h1>
      <Galaxy />
    </div>
  );
}

export default App;

Customization

import { Galaxy } from 'react-stars-particles';

function App() {
  return (
    <div>
      <h1>Custom Galaxy</h1>
      <Galaxy 
        quantity={200}
        attract={0.8}
        repulse={0.3}
        color="blue"
      />
    </div>
  );
}

export default App;

License

This project is licensed under the MIT License. See the LICENSE file for details.

NPM Package

Here's the NPM page associated with this package:

NPM

Showcase

Check out the react-stars-particles showcase:

Showcase

GitHub

Explore the react-stars-particles and showcase GitHub repositories:

GitHub - react-stars-particles

GitHub - Galaxy Simulator

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago