yew_confetti

Crates.ioyew_confetti
lib.rsyew_confetti
version0.4.2
sourcesrc
created_at2024-11-15 06:36:11.931795
updated_at2024-11-17 20:22:19.143313
descriptionConfetti animation for Yew websites
homepage
repositoryhttps://github.com/finnbear/yew_confetti/
max_upload_size
id1448805
size28,184
Finn Bear (finnbear)

documentation

README

yew_confetti

Documentation crates.io Build Test Page

Confetti animation for Yew websites, inspired by canvas-confetti.

Usage

use yew::html;
use yew_confetti::{Confetti, Cannon, Mode};

// Defaults, except style prop.
// Shape and color props omitted.
html! {
    <Confetti
        width={256}
        height={256}
        decay={0.3}
        drift={0}
        gravity={1}
        lifespan={2.5}
        scalar={5}
        style={"background-color: black; width: 256px; height: 256px;"}
    >
        <Cannon
            x={0.5}
            y={0.5}
            angle={1.5707964}
            spread={0.7853982}
            velocity={2}
            mode={Mode::continuous(100)}
        />
    </Confetti>
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 20

cargo fmt