@fireworks-js/svelte

2.10.8 • Public • Published

@fireworks-js/svelte

https://github.com/crashmax-dev/fireworks-js

Installation

npm install @fireworks-js/svelte

Usage

<script lang="ts">
  import { Fireworks } from '@fireworks-js/svelte'
  import type { FireworksOptions } from '@fireworks-js/svelte'

  let fw: Fireworks
  let options: FireworksOptions = {
    opacity: 0.5
  }

  function toggleFireworks() {
    const fireworks = fw.fireworksInstance()
    if (fireworks.isRunning) {
      fireworks.waitStop()
    } else {
      fireworks.start()
    }
  }
</script>
<Fireworks bind:this={fw} autostart={false} {options} class="fireworks" />

Package Sidebar

Install

npm i @fireworks-js/svelte

Weekly Downloads

157

Version

2.10.8

License

MIT

Unpacked Size

5 kB

Total Files

7

Last publish

Collaborators

  • crashmax