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

<mth-qr-code>

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

Zero-dependency deterministic SVG QR Code generator (ISO/IEC 18004 Byte mode with Reed-Solomon ECC) and accessible label.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/qr-code"></script>
<mth-qr-code size="160" error-correction="L"></mth-qr-code>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
valuevaluestring""Payload string encoded into the QR code.
labellabelstring""Accessible alternative text describing what the QR code links to or encodes.
sizesizenumber160Rendered square inline/block dimension in CSS pixels.
errorCorrectionerror-correction'L' | 'M' | 'Q' | 'H'"M"QR Reed-Solomon error correction level (L, M, Q, or H).
quietZonequiet-zonenumber2Quiet-zone border width in QR modules.

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
i18nRoutes 2 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test