← All Components
<mth-tour-step>
Declarative guided-tour step item consumed by <mth-tour> or displayed standalone, pairing a target CSS selector with heading, placement, and slotted instructions.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-tour-step>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/tour-step"></script>
<mth-tour-step placement="top">Example</mth-tour-step>import '@methane-ui/ui/tour-step';
import '@methane-ui/react';
export function Example() {
return <mth-tour-step placement="top">Example</mth-tour-step>;
}<script setup lang="ts">
import '@methane-ui/ui/tour-step';
</script>
<template>
<mth-tour-step placement="top">Example</mth-tour-step>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/tour-step';
import { MthTourStepDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthTourStepDirective],
template: `<mth-tour-step placement="top">Example</mth-tour-step>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/tour-step';
import MthTourStep from '@methane-ui/svelte/MthTourStep.svelte';
</script>
<MthTourStep placement="top">Example</MthTourStep>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
stepId | step-id | string | "" | Stable identifier for the step. |
target | target | string | "" | CSS selector of the DOM element anchored by this tour step. |
heading | heading | string | "" | Heading displayed in the tour popover for this step. |
placement | placement | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end' | "bottom" | Preferred popover placement relative to the target element. |
active | active | boolean | false | Marks whether this step is currently active. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-step-enter | { stepId: string } | Fired when this step becomes active. |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | Focus ownership matches focusModel="none". | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| states | Exposes ElementInternals CustomStateSet flags: :state(active). | Conformance suite |
| i18n | Routes 1 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |