← All Components
<mth-fieldset>
Semantic form grouping container rendering a shadow <fieldset> and <legend> with FormContext disabled propagation.
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-fieldset>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/fieldset"></script>
<mth-fieldset>Example</mth-fieldset>import '@methane-ui/ui/fieldset';
import '@methane-ui/react';
export function Example() {
return <mth-fieldset>Example</mth-fieldset>;
}<script setup lang="ts">
import '@methane-ui/ui/fieldset';
</script>
<template>
<mth-fieldset>Example</mth-fieldset>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/fieldset';
import { MthFieldsetDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthFieldsetDirective],
template: `<mth-fieldset>Example</mth-fieldset>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/fieldset';
import MthFieldset from '@methane-ui/svelte/MthFieldset.svelte';
</script>
<MthFieldset>Example</MthFieldset>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
legend | legend | string | "" | Text displayed inside the fieldset <legend>. |
hint | hint | string | "" | Supplementary helper text for the group. |
error | error | string | "" | Group-level validation error message. |
disabled | disabled | boolean | false | Disables all enclosed form controls via shadow fieldset and FormContext. |
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". | 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), :state(invalid). | Conformance suite |
| i18n | Routes 1 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |