Forms
FormLayoutGroup
Groups FormItems vertically or side by side, optionally joined into one segmented field.
import { FormLayoutGroup } from "datui";Playground
<FormLayoutGroup mode="vertical" />Examples
Horizontal and segmented
Accessibility
- With
aria-labeloraria-labelledbythe group getsrole="group". - Horizontal groups stack below the tablet breakpoint; each field keeps its own label.
API
FormLayoutGroup
Groups FormItems vertically or side by side. Name the group with `aria-labelledby` / `aria-label` and it gets `role="group"`.
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| mode | "horizontal" | "vertical" | vertical | `horizontal` places items side by side from the tablet breakpoint (stacked below it). |
| noPadding | boolean | false | Removes the horizontal padding. |
| onRemove | ((event: MouseEvent<HTMLButtonElement, MouseEvent>) => void) | — | |
| removable | boolean | "indent" | — | `true` shows a remove button after the content; `"indent"` only reserves its space for alignment. |
| removeLabel | string | — | Accessible label of the remove button. |
| segmented | boolean | false | Join the items' fields into one bordered block (e.g. first + last name). |