npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-fireworks

v0.2.6

Published

A customizable firework like animation that can be used as a component in a react native project

Downloads

137

Readme

Fireworks

A customizable firework like animation that can be used as a component in a react native project.

Demo GIF of fireworks being rendered

Installation

npm i react-native-fireworks

Import

import Fireworks from 'react-native-fireworks'

Usage

Minimal code to ignite the fireworks 🎇

<Fireworks/>

The parameters like the speed of the explosions, the density of fireworks and the colors of the fire can be customized.

<Fireworks
  speed={3}
  density={8}
  colors={['#ff0','#ff3','#cc0','#ff4500','#ff6347']}
  iterations={5}
  height={150}
  width={100}
  zIndex={2}
  circular={true}
/>

Props

There are 8 props and all the 8 are optional.

1. speed

It denotes how fast will an individual cracker explode. It is a number with possible values- 1,2 and 3. 1 is for the slowest and 3 for the fastest. The default value is 2.

2. density

It denotes the number of crackers exploding simultaneously. It is a number between 1 and 10. The default value is 5.

3. colors

The fireworks explode into colorful light crystals. You can set the colors of your choice by passing their hex codes or rgb values (as Strings) in an array. If you don't pass any colors, luckily you will get light crystals of all possible colors ranging from 'rgb(0,0,0)' to 'rgb(255,255,255)'.

4. iterations

It denotes the number of times the explosions take place. The density prop controls the number of simultaneous explosions whereas iterations tells how many times the simultaneous explosions should occur.It can be any number or the string- 'infinite'. The default value is 'infinite'.

5. height

Height of the area in which fireworks are rendered. Its default value is the height of the screen.

6. width

Width of the area in which fireworks are rendered. Its default value is the width of the screen.

7. zIndex

zIndex of the Firework component. Its default value is 10.

8. circular

When set to true, the crackers burst making a circle as shown below. The default value is false.

Demo GIF of circular fireworks being rendered