PSC.Blazor.Components.Tours
1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package PSC.Blazor.Components.Tours --version 1.0.1
NuGet\Install-Package PSC.Blazor.Components.Tours -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PSC.Blazor.Components.Tours" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PSC.Blazor.Components.Tours --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PSC.Blazor.Components.Tours, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PSC.Blazor.Components.Tours as a Cake Addin #addin nuget:?package=PSC.Blazor.Components.Tours&version=1.0.1 // Install PSC.Blazor.Components.Tours as a Cake Tool #tool nuget:?package=PSC.Blazor.Components.Tours&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Guided Tours Blazor Component
This is a new Guided Tours Blazor Component for Blazor WebAssembly and Blazor Server. The components is build with .NET6.
Installation
Download and install the package for NuGet. Then, register the service in your project.
Register the service in Startup.cs (Server Side)
using PSC.Blazor.Components.Tours;
...
...
public void ConfigureServices(IServiceCollection services)
{
...
services.UseGTour();
...
}
Register the service in Startup.cs (WASM)
using PSC.Blazor.Components.Tours;
...
...
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.UseTour();
await builder.Build().RunAsync();
}
Add Styles to the _Host.cshtml (optional)
<link rel="stylesheet" href="_content/STGTour.GTour/css/styles.css" />
Create a Tour
The tour can be included in a separate Razor Component or on the page.
<GuidedTour TourId="FormGuidedTour" OverlayEnabled="true">
<GuidedTourStep Title="My First Step" StepName="firstStep" TourStepSequence="1" ElementSelector="[data-form-firstStep]">
<span>This is my first step</span>
</GuidedTourStep>
</GuidedTour>
Set the step target
<div data-form-firstStep>
<span>My parent container is the first step target, see my parent wrapper's data attribute corresponding to the ElementSelector of the step?</span>
</div>
Run tour via service
@code {
[Inject]
private ITourService TourService { get; set; }
private async Task StartTour()
{
await TourService.StartTour("FormGuidedTour");
}
}
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Full component for a Guided Tour for Blazor