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

<mth-math-editor>

@methane-ui/editor~9.0 KB brotli shell + lazy engine~2.6 KB shell · lazy engine chunk

Form-associated LaTeX formula editor with quick-symbol toolbar, KaTeX rendering, sanitized preview, 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-math-editor> (@methane-ui/editor)
Ready · interact with <mth-math-editor>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/editor/math-editor"></script>
<mth-math-editor display-mode></mth-math-editor>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
namenamestring""name property.
labellabelstring""label property.
valuevaluestring""value property.
placeholderplaceholderstring""placeholder property.
displayModedisplay-modebooleantruedisplayMode property.
requiredrequiredbooleanfalserequired property.
disableddisabledbooleanfalsedisabled property.
readonlyreadonlybooleanfalsereadonly property.

Events

EventDetail TypeDescription
mth-input{ value: string }Emitted event mth-input.
mth-change{ value: string }Emitted event mth-change.
mth-error{ message: string }Emitted event mth-error.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
ArrowRightltrsymbol button focusedmoves focus to next symbol button
ArrowLeftrtlsymbol button focusedmoves focus to next symbol button

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
keyboardImplements all 2 APG keyboard transitions across LTR/RTL.mth-math-editor.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(disabled), :state(readonly), :state(invalid), :state(display-mode), :state(dirty), :state(touched), :state(focused).Conformance suite
i18nRoutes 13 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test