Product tours for Blazor,
decided in C#.
Multi-step product tours, spotlights, contextual hints and full application walkthroughs, written in C# and Razor. There is no JavaScript tour engine underneath: the browser layer only measures, observes and routes keys, and every decision about what to show, when and where is made in C#.
dotnet add package Bit.Bonboarding
Capabilities
The hard parts of a tour, done once
Each of these is a page of the docs with a working tour on it - and every tour on this site is the library's own default card, restyled through its CSS custom properties.
Positioning that behaves
Collision-aware placement computed in C#: shift before flip, arrow clamping, viewport padding, and sane behaviour for targets larger than the screen.
Placement & spotlight →Elements that are not there yet
Wait, skip, centre or fail, per step. Waiting uses a mutation observer rather than a polling timer, a target replaced by a re-render is rebound rather than lost, and a step can wait for the user to use the control - or for the application to say the job is done.
Dynamic targets →Branching and conditions
Steps can be gated, tours can be limited to some users, tours can fork on an answer, and Back follows the path the user actually took rather than the order the steps were declared in.
Conditional & branching →Respectful by default
An automatic tour queues behind the one the user is taking, by priority. "Remind me later" snoozes, a definition is checked before anyone sees it, and a tour can be paused, resumed or driven from code.
Lifecycle & orchestration →Guidance that stays on the page
Beacons that open a hint or a tour, an onboarding checklist that ticks itself off, and a list of tours to start, resume or replay from a help menu.
Beacons, checklists & tour lists →Route-aware
A tour can span pages: it navigates for you and waits for the page to render. Wander off mid-tour and it holds its place instead of dragging you back; reload, and it resumes.
Multi-page tour →Yours to restyle
Every value of the card is a public CSS custom property, in light, dark and system palettes - plus localised labels and right-to-left tours.
Theming & RTL →Headless when you need it
Replace one step's body or footer, or the whole card, overlay and waiting state. The library keeps measuring, placing and focusing the popover for you.
Headless UI →Analytics-grade events
Every moment of a tour is an event - including how long each step was on screen - and progress is stored after every step, so a user resumes where they left off.
Events & persistence →In practice
The tour above, in code
Mark what you want to point at
A data-bonboarding-anchor attribute is all a target needs. It survives
re-renders, works on elements that do not exist yet, and needs no
ElementReference. CSS selectors work too.
<button data-bonboarding-anchor="new-project">New project</button> <input type="search" data-bonboarding-anchor="search" />
Declare the tour next to the page
BonboardingTour renders nothing itself: the one BonboardingRoot
your app hosts draws whichever tour is running. A step without a target is a centred card.
<BonboardingTour Id="welcome" AutoStart="BonboardingAutoStart.Once"> <BonboardingStep Anchor="new-project" Title="Create a project" /> <BonboardingStep Anchor="search" Title="Find anything" /> </BonboardingTour>
Or build it as data
The components build a BonboardingTourDefinition; constructing one directly is
equally supported, and is what you want when tours come from configuration or a CMS.
var tour = new BonboardingTourDefinition { Id = "welcome", Steps = { new BonboardingStepDefinition { Target = BonboardingStepTarget.Anchor("new-project"), Title = "Create a project", }, new BonboardingStepDefinition { Target = ".bb-search-trigger", // a CSS selector converts implicitly Title = "That is the tour", }, }, }; await BonboardingService.StartOnceAsync(tour); // skipped once finished or dismissed
Comparison
Why not wrap a JavaScript tour library?
A wrapper keeps the tour's state on the other side of interop, so every condition, branch and route change becomes a round trip. Bonboarding keeps the decisions in C#, next to the application state they depend on.
| Concern | JavaScript library through interop | Bonboarding |
|---|---|---|
| Where the tour runs | A JavaScript engine, called through interop | A C# session - the browser only measures, observes and routes keys |
| Conditions and branches | Written in JavaScript, or a round trip per step | When, ResolveNext and CanAdvance - C# delegates over your state |
| Steps on other pages | Stop, navigate and restart by hand | Route on the step: the engine navigates and waits for the page |
| Elements that render late | Your own timers and retries | Wait, skip, centre or fail per step, on a mutation observer |
| Testing the flow | Needs a browser | The DOM seam is an interface - the engine is unit-tested without one |
Where to start
Choose your path
New to Bonboarding?
Install, register, link the stylesheet, host one root - a first tour in five minutes.
Getting started →Want to see it live?
Every page of the docs is a working tour, with the options it demonstrates one click away.
Open the demos →Building with an AI agent?
This site is an MCP server: point your agent at /mcp and it reads the shipped library instead of guessing.
Questions
Frequently asked
Is this a wrapper around a JavaScript tour library?
No. The browser layer is a single small module that measures elements, watches them for movement, scrolls, and routes keyboard events. Which step comes next, whether it is shown, where the popover goes and what happens when a target is missing are all decided in C#.
Which render modes does it work in?
Blazor Server, Blazor WebAssembly and Blazor Web App (Server, WebAssembly or Auto), on .NET 10
and 11, including while prerendering. Start tours from OnAfterRenderAsync, a
user action or AutoStart - this site runs on InteractiveAuto.
Does it remember how far a user got?
Yes. Progress is written to the registered IBonboardingStore after every step -
by default localStorage with an in-memory mirror - so a user resumes where they
were, and StartOnceAsync skips a tour they already finished or dismissed.
Can it look like my product?
Every value of the default card is a --bit-bonboarding-* custom property, a step
can replace its header, body or footer, and a host can render the whole card itself while
the library keeps placing and focusing it.
Can it show hints and checklists, not just tours?
Yes. BonboardingBeacon puts a pulsing dot on an element that opens a hint or a tour,
BonboardingChecklist lists the things a new user should do and ticks them off as they
happen, and BonboardingTourList is the content of a help menu. They use the same engine,
store and theme as the tours.
What happens when two tours want the screen at once?
A tour the user starts replaces the running one, which keeps its progress. A tour that starts itself
- a page's AutoStart - queues behind the running one instead, ordered by
Priority, and is checked again when its turn comes.
Is it accessible?
The popover is a labelled dialog with a focus trap and focus restoration, the tour is driven from the keyboard, every step is announced in a live region, and reduced motion and forced colors are honoured.
Show people around
One package, one service registration, one stylesheet and one host - and any page can have a tour.
dotnet add package Bit.Bonboarding