BlazorClippy 0.1.0
dotnet add package BlazorClippy --version 0.1.0
NuGet\Install-Package BlazorClippy -Version 0.1.0
<PackageReference Include="BlazorClippy" Version="0.1.0" />
paket add BlazorClippy --version 0.1.0
#r "nuget: BlazorClippy, 0.1.0"
// Install BlazorClippy as a Cake Addin #addin nuget:?package=BlazorClippy&version=0.1.0 // Install BlazorClippy as a Cake Tool #tool nuget:?package=BlazorClippy&version=0.1.0
BlazorClippy
Our hero...Mr. Clippy... is back to help us in the Blazor 😃 The simple wrapper for the clippyjs package.
I would like to thanks to Clippyjs project. Next thanks goes to my old colleague Ondrej Vicar, who found the clippyjs before few years for me and created simple wrapper in electron in that days. I still was waiting when I will get back to the Clippy 😄 Thanks a lot Ondro 😃
Supported framework
The library and demo is built with .NET 6.0. Project was created in Microsoft Visual Studio 2022 (17.2.0 Preview 4).
Basic usage
Demo project
Please explore the demo project.
Create Blazor Application and load library
Create Blazor empty project in Visual Studio
Add BlazorClippy nuget package
dotnet add package BlazorClippy
Add dependencies
Add this to the header
<link rel="stylesheet" type="text/css" href="_content/BlazorClippy/clippy.css" media="all">
Add this to the body behind the <div id="app>Loading...</div>
<script src="_content/BlazorClippy/jquery.slim.min.js"></script>
<script src="_content/BlazorClippy/clippy.min.js"></script>
<script src="_content/BlazorClippy/clippyInterop.js"></script>
Add using and BlazorClippy service in the Program.cs
using BlazorClippy;
.....
builder.Services.AddScoped<ClippyService>();
Load clippy
At start you need to initialized the Clippy. You can do it with call of clippy.Load() function. You can call this function during the load of the app also. But call it just once!
@inject ClippyService clippy
<div class="row">
<div class="col">
<button class="btn btn-primary" onclick="@(async () => await clippy.Load())">Load</button>
</div>
</div>
Call other functions you need
// play random animation
await clippy.AnimateRandom();
// Play specific animation - check ClippyAnimations enum to know all
await clippy.PlayAnimation(ClippyAnimations.GoodBye);
// Display text
await clippy.Speak("Hello All Blazor Lovers :)");
// Show gesture in some direction
await clippy.GestureAt(50,50);
More commands you can find in the ClippyService.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.0 | 482 | 5/8/2022 |