Crates.io | yew_confetti |
lib.rs | yew_confetti |
version | 0.4.2 |
source | src |
created_at | 2024-11-15 06:36:11.931795 |
updated_at | 2024-11-17 20:22:19.143313 |
description | Confetti animation for Yew websites |
homepage | |
repository | https://github.com/finnbear/yew_confetti/ |
max_upload_size | |
id | 1448805 |
size | 28,184 |
Confetti animation for Yew websites, inspired by canvas-confetti.
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>
}
Licensed under either of
at your option.
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.