Guidelines popup for Blazor
Nuget: Blazor.GuidePopup
builder.Services.AddGuider();
// also use with options
// builder.Services.AddGuider(options => {
// options.PopupClassName = "your-class";
///...
//})
and in index.html
...
<link href="_content/Polarizelab.Blazor.GuidePopup/styles.css" rel="stylesheet"/>
...
...
<script src="_content/Polarizelab.Blazor.GuidePopup/Guider.js"></script>
...
@page "/"
@inject Polarizelab.Blazor.GuidePopup.IGuider Guider
<div ref="showPopupNearMe"></div>
@functions{
ElementReference showPopupNearMe;
protected override void OnInitialized()
{
base.OnInitialized();
Guider.Show("elementId", "Content", GuidePosition.Right);
// you can use it with ElementRef or X,Y
// Guider.Show(showPopupNearMe, "Content", GuidePosition.Bottom);
// Guider.Show(200, 400, "Content", GuidePosition.TopLeft);
Guider.OnClosed += OnClosed;
}
private void OnClosed(object sender, System.EventArgs args)
{
Console.WriteLine("Closed");
}
}
@inject Polarizelab.Blazor.GuidePopup.IGuider Guider
<div ref="showPopupNearMe"></div>
@code{
ElementReference showPopupNearMe;
private void ShowGuidline(){
Guider.Make("elementId", "Content", GuidePosition.Right)
.Make(showPopupNearMe, "Content", GuidePosition.Bottom)
.Make(300, 300, "Test 3")
.Start();
}
}