6 releases (3 breaking)
new 0.4.2 | Nov 17, 2024 |
---|---|
0.4.1 | Nov 17, 2024 |
0.3.0 | Nov 16, 2024 |
0.2.0 | Nov 15, 2024 |
0.1.0 | Nov 15, 2024 |
#1059 in Web programming
236 downloads per month
26KB
381 lines
yew_confetti
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
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.
Dependencies
~11–20MB
~265K SLoC