StealThis .dev

Onboarding — Spotlight product tour (coachmarks)

A guided spotlight product tour layered over a faux Northwind workspace, where a dimmed overlay punches a cut-out highlight around the current target while a coachmark bubble carries a title, body copy, a 2 of 5 step counter, progress dots, and Back, Next, and Skip controls. The bubble auto-places toward whichever viewport edge has room, the highlight recomputes on resize and scroll, the final step clears everything, and live switches toggle spotlight cut-out versus a bordered ring and auto versus bottom placement.

Abrir en Lab
html css vanilla-js
Targets: JS HTML

Código

Spotlight product tour (coachmarks)

A multi-step coachmark tour staged over a realistic product shell — the Northwind workspace with a search bar, sidebar nav, live stat cards, and an activity feed. Starting the tour drops a dimmed overlay over the whole UI and uses an SVG mask to punch a rounded cut-out around the current target, so the highlighted element reads through crisply while everything else recedes. A floating coachmark bubble follows along, carrying a step pill (2 of 5), title, body copy, animated progress dots, and Back / Next / Skip controls, with the final step swapping Next for Finish and clearing the overlay.

The bubble is auto-placed: it measures the target rect and the surrounding viewport space, honors a per-step preferred side, and falls back through bottom, top, right, and left until it finds room, clamping to the screen edges and pointing its arrow at the target. The highlight and bubble recompute on every resize and scroll (rAF-throttled), and off-screen targets are scrolled into view before measuring. Backdrop clicks advance, ArrowLeft/ArrowRight and Enter drive it from the keyboard, Escape skips out, and focus is trapped across the bubble’s controls and restored to the opener when the tour ends. A small toast() helper announces completion or skip through an aria-live region.

A segmented switcher demonstrates both variant axes live. Highlight toggles between the spotlight cut-out (with a soft pulse ring on the hole edge) and a simpler bordered highlight that draws a brand ring with a flat scrim. Tooltip toggles between fully auto placement and a forced bottom placement. Down to 360px the shell collapses to a single column, the sidebar nav wraps inline, and the coachmark spans the available width.

Illustrative UI only — fictional names and data.