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

<mth-icon>

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

Semantic vector icon catalog rendered via Lit svg templates with accessible label/decorative modes and slot fallback.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/icon"></script>
<mth-icon size="xs">Example</mth-icon>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
namenamestring""Built-in icon identifier (check, close, chevron-down, chevron-right, chevron-left, chevron-up, search, info, warning, error, success, external, menu, plus, minus, user, copy, share).
sizesize'xs' | 'sm' | 'md' | 'lg' | 'xl'"md"Icon dimension preset (xs | sm | md | lg | xl).
labellabelstring""Accessible label; renders role="img" with aria-label when provided, or aria-hidden="true" when decorative.

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