Component
Fieldset
The same wiring for a group of related controls.
import { Fieldset } from '@loidolt/theme-svelte';
Example
Notes
- The description and error hang off the
<fieldset>: grouping context is announced once on entry, so a shared message stays shared. - No
aria-invalid—role="group"does not support it. The error carriesrole="alert", and each invalid control marks itself.
Props
Generated from the component source, so it cannot drift from the implementation.
| Prop | Type | Default | Notes |
|---|---|---|---|
children required | Snippet | — | |
legend required | string | — | Visible group label, rendered as a <legend>. |
class | string | — | |
description | string | — | |
error | string | — | |
id | string | $props.id() | Defaults to an SSR-stable generated id, used to wire the description and error. |
optional | boolean | false | |
optionalText | string | 'Optional' | Text of the "optional" marker, for localisation. |
ref bindable | HTMLFieldSetElement | null | null |
Plus the attributes of HTMLFieldsetAttributes, forwarded to the root element.