0.1.37 • Published 3 years ago

beautiful-web-animations v0.1.37

Weekly downloads
-
License
GLP-3.0
Repository
github
Last release
3 years ago

beautiful-web-animations

Yet another collection of pre-made animations made for the web :)

See them all in action here: https://thibaultjanbeyer.github.io/beautiful-web-animations/

Bubble Explosion

Usage:

const BE = BubbleExplosion({ 
  element: document.querySelector('div'), // the element that will get animated
  eventListener: 'click', // optional, event on which the animation will start
  content: '✅', // optional, this is the valid CSS content, default are bubbles (more info: https://developer.mozilla.org/en-US/docs/Web/CSS/content)
  particles: { // optional, particles settings
    size: 10, // optional, size of the explosion particles
    direction: 'up', // optional, direction for the particles to fly (up|down)
    amount: 25, // optional, amount of particles to generate
  }
  areaSize: { // optional, area size of the explosion
    x: 100, // optional, width of the explosion
    y: 100, // optional, height of the explosion
  },
  isAppearing: false, // optional, if true, it reverses the animation (appears instead of disappearing)
})

BE.trigger() // if no event listener is how you can trigger the animation programmatically

BE.destroy() // cleans up the animation by removing the nodes from the DOM

See examples section:

Bubble Explosion

Preload included!

You can also use URLs in your content props. Those will be preloaded before triggering the animation in order to always see the image!

content: "url(https://cataas.com/cat)"
0.1.37

3 years ago

0.1.35

3 years ago

0.1.34

3 years ago

0.1.33

3 years ago

0.1.32

3 years ago

0.1.31

3 years ago

0.1.30

3 years ago

0.1.29

3 years ago

0.1.28

3 years ago

0.1.27

3 years ago

0.1.26

3 years ago

0.1.25

3 years ago

0.1.24

3 years ago

0.1.23

3 years ago

0.1.22

3 years ago

0.1.21

3 years ago

0.1.20

3 years ago

0.1.19

3 years ago

0.1.18

3 years ago

0.1.17

3 years ago

0.1.16

3 years ago

0.1.15

3 years ago

0.1.14

3 years ago

0.1.13

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.1

3 years ago