All Projects → transitive-bullshit → React Particle Effect Button

transitive-bullshit / React Particle Effect Button

Bursting particle effect buttons for React 🎉

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Particle Effect Button

Canvas Test
🎮 happy canvas
Stars: ✭ 1,722 (+24.33%)
Mutual labels:  particles, canvas
Proton
Javascript particle animation library
Stars: ✭ 1,958 (+41.37%)
Mutual labels:  particles, canvas
Phaser Examples
Contains hundreds of source code examples and related media for the Phaser HTML5 Game Framework.
Stars: ✭ 1,680 (+21.3%)
Mutual labels:  particles, canvas
Canvas Confetti
🎉 on-demand confetti gun
Stars: ✭ 2,394 (+72.85%)
Mutual labels:  particles, canvas
Disintegrate
A small JS library to break DOM elements into animated Canvas particles.
Stars: ✭ 251 (-81.88%)
Mutual labels:  particles, canvas
Layaair discard
This is old LayaAir veriosn writetten by ActionScript 3.0 ,now LayaAir is using TypeScript as the Engine Script,Please use https://github.com/layabox/LayaAir instead.
Stars: ✭ 1,858 (+34.15%)
Mutual labels:  particles, canvas
Vue Canvas Nest
💫 A Vue.js background component for canvas-nest.
Stars: ✭ 136 (-90.18%)
Mutual labels:  particles, canvas
Canvas Nest.js
♋ Interactive Particle / Nest System With JavaScript and Canvas, no jQuery.
Stars: ✭ 3,966 (+186.35%)
Mutual labels:  particles, canvas
Konfetti
Celebrate more with this lightweight confetti particle system 🎊
Stars: ✭ 2,278 (+64.48%)
Mutual labels:  particles, canvas
Black
World's fastest HTML5 2D game engine   🛸
Stars: ✭ 174 (-87.44%)
Mutual labels:  particles, canvas
React Particles Webgl
🔆 A 2D/3D particle library built on React, Three.js and WebGL
Stars: ✭ 330 (-76.17%)
Mutual labels:  particles, canvas
Particleeffectsbuttons
A little library that can be used for bursting particles effects on buttons and other elements
Stars: ✭ 1,122 (-18.99%)
Mutual labels:  particles, button
Spbutton
自定义按钮,图片可在上、左、下、右,可调整图文间距,新增属性支持storyBoard/xib,系统按钮的所有属性和方法依然生效
Stars: ✭ 91 (-93.43%)
Mutual labels:  button
Canvas2pdf
Export your HTML canvas to PDF
Stars: ✭ 96 (-93.07%)
Mutual labels:  canvas
Vega
A visualization grammar.
Stars: ✭ 9,554 (+589.82%)
Mutual labels:  canvas
Windows10debloater
Script to remove Windows 10 bloatware.
Stars: ✭ 11,462 (+727.58%)
Mutual labels:  button
Mapbox Plugins
Customized Mapbox 🌏 plugins, including game 🎮 control, canvasOverlayer , scene animation. using ES6
Stars: ✭ 99 (-92.85%)
Mutual labels:  canvas
Particles.js
A lightweight, dependency-free and responsive javascript plugin for particle backgrounds.
Stars: ✭ 1,336 (-3.54%)
Mutual labels:  particles
Fun Photo Combine
一个有趣的图片合成工具(生成的图片在QQ缩略图与大图表现不同)
Stars: ✭ 90 (-93.5%)
Mutual labels:  canvas
Nanoleaf Desktop
A modern desktop application for the Nanoleaf Aurora and Canvas
Stars: ✭ 90 (-93.5%)
Mutual labels:  canvas

react-particle-effect-button (demo)

Bursting particle effect buttons for React.

NPM Build Status JavaScript Style Guide

Demo

This library is a React port of an awesome Codrops Article by Luis Manuel (original source).

Install

npm install --save react-particle-effect-button

Usage

Check out the Demo to see it in action.

import React, { Component } from 'react'

import ParticleEffectButton from 'react-particle-effect-button'

class App extends Component {
  state = {
    hidden: false
  }

  render () {
    return (
      <ParticleEffectButton
        color='#121019'
        hidden={this.state.hidden}
      >
        BUTTON CONTENT GOES HERE
      </ParticleEffectButton>
    )
  }
}

Note that children can be anything from a simple <button> to a complex React subtree. The children should represent the button's contents.

You change the hidden boolean prop to kick-off an animation, typically as a result of a click on the button's contents. If hidden changes to true, the button will perform a disintegrating animation. If hidden changes to false, it will reverse and reintegrate the original content.

Props

Property Type Default Description
hidden boolean false Whether button should be hidden or visible. Changing this prop starts an animation.
color string '#000' Particle color. Should match the button content's background color
children React Node undefined The contents of the button.
duration number 1000 Animation duration in milliseconds.
easing string 'easeInOutCubic' Animation easing.
type string circle 'circle' or 'rectangle' or 'triangle'
style string fill 'fill' or 'stroke'
direction string 'left' 'left' or 'right' or 'top' or 'bottom'
canvasPadding number 150 Amount of extra padding to add to the canvas since the animation will overflow the content's bounds
size number func random(4)
speed number func random(4)
particlesAmountCoefficient number 3 Increases or decreases the relative number of particles
oscillationCoefficient number 20 Increases or decreases the relative curvature of particles
onBegin func noop Callback to be notified once an animation starts.
onComplete func noop Callback to be notified once an animation completes.

I tried to keep the properties exactly the same as in the original codrops version.

Related

This module was bootstrapped with create-react-library.

License

MIT © Travis Fischer

Support my OSS work by following me on twitter twitter

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].