Groups form fields with even, tokenized spacing: vertical stack, horizontal row, or 1-4 column grid, optionally as a semantic fieldset.

npx slipstream-ui@latest add form-layout
Grid (2 columns)
Profile

Two-up layout for short fields

Stack and row
Add a member

Props

PropTypeDefaultDescription
layout'stack' | 'row' | 'grid''stack'Even vertical stack, horizontal row, or column grid.
columns1 | 2 | 3 | 42Grid column count (literal classes survive CSS purging).
gap'none' | 'sm' | 'md' | 'lg' | 'xl' | number—Even spacing — token or exact pixels (16).
legendstring—Group label rendered as a semantic <legend> (fieldset mode).
descriptionstring—Supporting line under the legend (fieldset mode).
as'div' | 'fieldset''div'Render as a semantic fieldset when the layout wraps related controls.

Accessibility

  • Fieldset mode gives the group a name via a real <legend>.
  • Reading order equals DOM order — row/grid layouts reflow visually only.
  • Space fields with gap tokens — never spacer divs that drift from the scale.

Browser support

BrowserTested versions
Chrome111+ (Mar 2023)
Edge111+ (Mar 2023)
Firefox121+ (Dec 2023)
Safari17.2+ — macOS & iOS (Dec 2023)

Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA — the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.

Was this page helpful?