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

<mth-option>

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

Selectable option item for <mth-combobox> and list containers.

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-option> (@methane-ui/ui)
OKLCH Perceptual RampCSS Logical PropertiesDeclarative Shadow DOM
Ready · interact with <mth-option>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

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

Properties & Attributes

PropertyAttributeTypeDefaultDescription
valuevaluestring""Machine-readable value submitted when selected.
labellabelstring""Optional explicit display label overriding slotted text content.
disableddisabledbooleanfalsePrevents the option from being activated or selected.
selectedselectedbooleanfalseMarks whether the option is currently selected.
activeactivebooleanfalseMarks whether the option is currently highlighted via keyboard or pointer.

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusFocus ownership matches focusModel="none" with host role="option".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(selected), :state(disabled), :state(active).Conformance suite