FormSanity Demos

Rows and Annotations

The document grammar: a fieldset section holding a ul field group of li rows — label, control, and an optional small annotation.

  • Full name A compound row shares one label between controls.
Columns

An fs-cols group lays its rows into two columns, auto-balancing at the midpoint; an authored fs-col-start picks the split instead (see the Comparisons page).

Stacked Labels

fs-stacked on the group stacks every label in it; fs-inline on a row opts that row back to a label beside its control. The same pair cascades from the form element down.

A stacked fs-cols group pairs whole rows two-up, each stacking internally.

Choice Groups in Rows

A toggle fieldset written as a row joins the row layout: its legend takes the label column and its choices sit beside it, aligned with the other fields. A long legend or long choices belong in an fs-stacked row. One checkbox on its own is a lone toggle row: a label that wraps the checkbox, spanning the row, level with the labels around it.

  • Hungry?
  • Which of these would you eat right now?
Paired Content

Two fs-stacked rows in an fs-cols group sit side by side, each one label/control pair wide; a div.fs-cols pairs whole fieldsets the same way.

Toggle List (radios)
Toggle List (checkboxes)
Toggle Buttons (radios)
Toggle Buttons (checkboxes)
Caps

Informational caps come from data-fs-prefix and data-fs-suffix; file, date, and time controls get their picker caps automatically, and a datalist gets the caret.

Breakpoints

Two container-size breakpoints govern the layout, and both answer the form's own width rather than the viewport's — a form in a narrow sidebar behaves correctly on a wide screen. Below 52rem an fs-cols group collapses to a single column; below 32rem labels move above their controls. Resize the window to watch the sections above cross both. The lengths can be moved in site CSS — the vocabulary spec's Breakpoints section has the recipe.