PSC.Blazor.Components.Tours 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package PSC.Blazor.Components.Tours --version 1.0.3                
NuGet\Install-Package PSC.Blazor.Components.Tours -Version 1.0.3                
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.3" />                
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.3                
#r "nuget: PSC.Blazor.Components.Tours, 1.0.3"                
#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.3

// Install PSC.Blazor.Components.Tours as a Cake Tool
#tool nuget:?package=PSC.Blazor.Components.Tours&version=1.0.3                

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.UseTour();
    ...
}

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="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
<link rel="stylesheet" href="/_content/PSC.Blazor.Components.Tours/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 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.

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
1.0.10 4,337 6/14/2022
1.0.9 420 6/14/2022
1.0.8 421 6/14/2022
1.0.7 401 6/14/2022
1.0.6 387 6/14/2022
1.0.4 416 6/9/2022
1.0.3 412 6/9/2022
1.0.2 409 6/9/2022
1.0.1 429 6/9/2022

Full component for a Guided Tour for Blazor