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

<mth-markdown>

@methane-ui/editor~6.8 KB brotli shell + lazy engine~1.4 KB shell · lazy engine chunk

Read-only Markdown renderer using @methane-ui/sanitize with safe URL validation and token synchronization.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/editor/markdown"></script>
<mth-markdown>Example</mth-markdown>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
contentcontentstring""content property.
labellabelstring""label property.
allowRawHtmlallow-raw-htmlbooleanfalseallowRawHtml property.

Events

EventDetail TypeDescription
mth-render{ length: number }Emitted event mth-render.

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
statesExposes ElementInternals CustomStateSet flags: :state(rendered).Conformance suite
i18nRoutes 2 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test