Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-tour>

@methane-ui/ui~10.1 KB brotli (cold + Lit)~3.2 KB marginal

Guided multi-step onboarding tour orchestrating Light-DOM <mth-tour-step> children with OverlayController, PositioningController, and FocusTrapController.

When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.

Live Interactive Preview

Interactive StageLive Custom Element · <mth-tour> (@methane-ui/ui)
Start Guided TourToken Step TargetEvery component renders live with real Shadow DOM & keyboard support.Switch light, dark, high-contrast, and RTL direction right in the toolbar.
Ready · interact with <mth-tour>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/tour"></script>
<mth-tour current-step="0">Example</mth-tour>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
openopenbooleanfalseControls whether the guided tour overlay is visible.
currentStepcurrent-stepnumber0Zero-based index of the active <mth-tour-step>.
labellabelstring""Accessible region/dialog label for the tour.
forceFallbackforce-fallbackbooleanfalseForces JavaScript positioning fallback for deterministic anchoring.

Events

EventDetail TypeDescription
mth-openundefinedCancelable event fired before starting/opening the tour.
mth-after-openundefinedFired after the tour overlay opens.
mth-close{ reason: string }Cancelable event fired before closing the tour.
mth-after-closeundefinedFired after the tour closes.
mth-step-change{ index: number; stepId: string }Fired when the active tour step index changes.
mth-completeundefinedFired when finishing the final tour step.
mth-skip{ index: number }Fired when skipping/dismissing before completion.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
EscapebothopenSkips/closes the active tour and restores focus.
ArrowRightbothopenAdvances to the next tour step.
ArrowLeftbothopenReturns to the previous tour step.

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusFocus ownership matches focusModel="none".lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
keyboardImplements all 3 APG keyboard transitions across LTR/RTL.mth-tour.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(open).Conformance suite
i18nRoutes 7 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test