← All Components
<mth-option-group>
Semantic option group container with heading label for <mth-combobox>.
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-group>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/option-group"></script>
<mth-option-group>Example</mth-option-group>import '@methane-ui/ui/option-group';
import '@methane-ui/react';
export function Example() {
return <mth-option-group>Example</mth-option-group>;
}<script setup lang="ts">
import '@methane-ui/ui/option-group';
</script>
<template>
<mth-option-group>Example</mth-option-group>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/option-group';
import { MthOptionGroupDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthOptionGroupDirective],
template: `<mth-option-group>Example</mth-option-group>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/option-group';
import MthOptionGroup from '@methane-ui/svelte/MthOptionGroup.svelte';
</script>
<MthOptionGroup>Example</MthOptionGroup>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
label | label | string | "" | Visible and accessible group heading label. |
disabled | disabled | boolean | false | Disables all options nested inside the group. |
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="group". | 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(disabled). | Conformance suite |