Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctrl-alt-d/blazor-dom-confetti
Celebrate success with dom confetti on Blazor projects!
https://github.com/ctrl-alt-d/blazor-dom-confetti
blazor hacktoberfest
Last synced: 3 months ago
JSON representation
Celebrate success with dom confetti on Blazor projects!
- Host: GitHub
- URL: https://github.com/ctrl-alt-d/blazor-dom-confetti
- Owner: ctrl-alt-d
- License: mit
- Created: 2020-04-25T15:20:13.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-04T14:33:57.000Z (almost 2 years ago)
- Last Synced: 2024-09-24T13:36:44.995Z (4 months ago)
- Topics: blazor, hacktoberfest
- Language: HTML
- Homepage:
- Size: 1.54 MB
- Stars: 20
- Watchers: 3
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# blazor-dom-confetti
`blazor-dom-confetti` is a blazor wraper component for [dom-confetti](https://github.com/daniel-lundin/dom-confetti).
![ScreenShot](./DemosAndMore/ScreenShot/i.gif)
Can I see a live demo? Yes, at https://blazorrepl.com/repl/wluQmuPX38bvbL8n28
## QuickStart
Install [blazor-dom-confetti via nuget](https://www.nuget.org/packages/blazor-dom-confetti/) with your favorite method:
* .net cli: `dotnet add package blazor-dom-confetti --version 0.0.0.5`
* Package reference: ``
* Package manager: `Install-Package blazor-dom-confetti -Version 0.0.0.5`Use component where you want, just insert `` component where you want to raise confettis, and call `blafettis.RaiseConfetti();` method (remember to include namespace `using BlafettisLib;` or `@using BlafettisLib`):
```razor
@page "/counter"
@using BlafettisLibClick me
@code {
private int currentCount = 0;
protected Blafettis blafettis; // get the referenceprivate void IncrementCount()
{
currentCount++;
blafettis.RaiseConfetti(); // raise confetti via method
}
}
```Personalize your confetti with options (colors, angle, velocity, ...) see demo for a sample https://github.com/ctrl-alt-d/blazor-dom-confetti/blob/main/DemosAndMore/Demos/DemoServerSide/Pages/Options.razor
_From version `0.0.0.4` no js includes are needed._
### Contributions
* Be free to PR any feature or bugfix.
* Be free to post any issue.
* Be free to star and promote this project and also [dom-confetti](https://github.com/daniel-lundin/dom-confetti) project.### About
* License MIT, copyright Dani Herrera. The component blazor-dom-confetti is a wrapper for Daniel Lundin's [dom-confetti](https://github.com/daniel-lundin/dom-confetti) project. [dom-confetti](https://github.com/daniel-lundin/dom-confetti)'s code is included on `bundle.js` for devs convinience.
## What about a native blazor version
A blazor native version, without javascript, wrote 100% on c# and html is available at [./DemosAndMore/dom.confetti-blazor-native-component/blazor-blazor-confetti](./DemosAndMore/dom.confetti-blazor-native-component/blazor-blazor-confetti). It is a 100% JS free native blazor component. This component is a clone of [dom-confetti](https://github.com/daniel-lundin/dom-confetti) but without javascript, just Blazor. Not ready for production.