Skip to content
OGE logoOGE

Tour

oge-tour walks people through a page — onboarding, a new feature, a changed layout — one card at a time.

Each step dims the page, cuts a spotlight around its target, scrolls it into view and places the card beside it, flipping to fit; a step without a target centers the card. The card is a modal dialog named by its title, with Back, Next / Done and Skip; → and ← move between steps (mirrored in RTL), Escape skips and focus returns where it was. Under prefers-reduced-motion the spotlight jumps instead of gliding and scrolling is instant.

spotlight keyboard reduced motion RTL

Guided tour

Targets are CSS selectors here (an element or a function works too); placement picks the side of the card, which flips when it does not fit. The last step has no target, so its card is centered. closed reports how it ended — done, skip, escape, backdrop or api — so an app can show a tour only once.

steps target placement start() closed
Not taken yet

Resuming & centered steps

[(step)] and [(opened)] are two-way, so a tour can resume where the user left off. Steps without a target center the card over a dimmed page; closeOnBackdropClick lets a press on the page skip the tour (off by default).

step opened closeOnBackdropClick
Step 1 of 3