Components / Text & numbers
FormGroup
Label, helper text, error and required marker around any control; stacked or inline.
@ruckc/truss-ui Text & numbers
Import
import { FormGroup } from '@ruckc/truss-ui'; Playground
API
| Prop | Type | Default | Description |
|---|---|---|---|
label required | string | — | Visible label shown above the control. |
labelFor | string | — | The `id` of the control this label describes. |
helper | string | — | Helper text shown below the control (replaced by `error` when present). |
error | string | — | Error message. Marks the control invalid, replaces the hint, and is announced to assistive technology. |
required | boolean | false | Marks the field as required with an asterisk. |
inline | boolean | false | Place the label beside the control instead of above it. |
children required snippet | Snippet | — | Content, as a Svelte snippet. |