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

<mth-thinking-indicator>

@methane-ui/ai~7.9 KB brotli (kit + Lit)~2.0 KB marginal

Collapsible AI reasoning/chain-of-thought disclosure with elapsed timing and MotionController reduced-motion support.

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-thinking-indicator> (@methane-ui/ai)
Ready · interact with <mth-thinking-indicator>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ai/thinking-indicator"></script>
<mth-thinking-indicator elapsed-seconds="0">Example</mth-thinking-indicator>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
openopenbooleanfalseControls whether the reasoning panel is expanded.
streamingstreamingbooleanfalseDisplays active thinking spinner while reasoning streams.
elapsedSecondselapsed-secondsnumber0Formatted reasoning duration in seconds.
summarysummarystring""Custom disclosure heading overriding default localized label.
contentcontentstring""Plain-text reasoning summary shown inside the disclosure panel.

Events

EventDetail TypeDescription
mth-toggle{ open: boolean }Fired when the user toggles the disclosure state.
mth-openvoidCancelable motion lifecycle event before expanding.
mth-after-openvoidFired after expansion completes.
mth-closevoidCancelable motion lifecycle event before collapsing.
mth-after-closevoidFired after collapse completes.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
Enterbothtrigger button focusedtoggles reasoning panel open/closed
Spacebothtrigger button focusedtoggles reasoning panel open/closed

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 2 APG keyboard transitions across LTR/RTL.mth-thinking-indicator.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(open), :state(streaming).Conformance suite
i18nRoutes 3 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test