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

<mth-comment-thread>

@methane-ui/chat~6.8 KB brotli (kit + Lit)~1.4 KB marginal

Nested discussion comment thread with collapse/expand replies, resolve/reopen actions, inline replies, and @methane-ui/sanitize markdown bodies.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/chat/comment-thread"></script>
<mth-comment-thread allow-reply allow-resolve></mth-comment-thread>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
comments—ReadonlyArray<unknown>—Top-level comments with optional recursive replies arrays.
labellabelstring""Accessible region label.
allowReplyallow-replybooleantrueEnables inline reply triggers and forms.
allowResolveallow-resolvebooleantrueEnables resolve/reopen controls on top-level threads.
allowRawHtmlallow-raw-htmlbooleanfalseOpt-in flag forwarded to @methane-ui/sanitize (defaults to false).

Events

EventDetail TypeDescription
mth-reply{ parentId: string; body: string }Fired when an inline reply is submitted.
mth-resolve-toggle{ id: string; resolved: boolean }Fired when resolve/reopen state is toggled.

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusdelegatesFocus: true with zero host internals.role (ADR-014).lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
statesExposes ElementInternals CustomStateSet flags: :state(empty).Conformance suite
i18nRoutes 11 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test