← All Components
<mth-option>
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
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>import '@methane-ui/ui/option';
import '@methane-ui/react';
export function Example() {
return <mth-option>Example</mth-option>;
}<script setup lang="ts">
import '@methane-ui/ui/option';
</script>
<template>
<mth-option>Example</mth-option>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/option';
import { MthOptionDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthOptionDirective],
template: `<mth-option>Example</mth-option>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/option';
import MthOption from '@methane-ui/svelte/MthOption.svelte';
</script>
<MthOption>Example</MthOption>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value | string | "" | Machine-readable value submitted when selected. |
label | label | string | "" | Optional explicit display label overriding slotted text content. |
disabled | disabled | boolean | false | Prevents the option from being activated or selected. |
selected | selected | boolean | false | Marks whether the option is currently selected. |
active | active | boolean | false | Marks whether the option is currently highlighted via keyboard or pointer. |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | Focus ownership matches focusModel="none" with host role="option". | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| states | Exposes ElementInternals CustomStateSet flags: :state(selected), :state(disabled), :state(active). | Conformance suite |