@fireworks-js/svelte
2.10.8 • Public • Published
https://github.com/crashmax-dev/fireworks-js
npm install @fireworks-js/svelte
<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