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

PropTypeDefaultDescription
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 booleanfalseMarks the field as required with an asterisk.
inline booleanfalsePlace the label beside the control instead of above it.
children required snippet Snippet—Content, as a Svelte snippet.
/docs/form-group Truss UI · MIT