ThiloDesign System
DV

Forms

patterns
react-hook-form
zod

Form layout patterns using Field, react-hook-form, and Zod. Five patterns: single column, two column, with sections, inline compact, horizontal without borders.

react-hook-form + zod + @hookform/resolvers

Field states

Apply data-invalid to Field and aria-invalid to the input — the first turns the label red, the second applies the destructive ring.

Idle, no interaction

disabled — opacity 50%

required on the input element

readOnly — no ring, cursor text

disabled during submit

StateHow to set itVisual change
DefaultBorder visible, no ring
Focusfocus-visible (browser handles)ring-1 ring-ring
Errordata-invalid on Field + aria-invalid on inputLabel red · ring-1 ring-destructive · border-destructive
Disableddisabled on inputopacity-50 · cursor-not-allowed · not interactive
Read-onlyreadOnly on inputCursor text · no ring on focus · value not editable
Pendingdisabled on input + button during submitSame as disabled — re-enable after resolve/reject

Single column

Vertical field stack. Default pattern for modal and panel forms.

One-line summary of the ticket.

Two column

Two fields per row. Use for related pairs — Status + Priority, Department + Process Step.

With sections

Grouped fields using FieldSet + FieldLegend. Use when a form has 5+ fields that belong to distinct categories.

Basic info
Metadata

Inline compact

Horizontal filter bar. No validation — uses useState. NativeSelect preferred over Radix Select for compact toolbars.

Horizontal without borders

Per-field click-to-edit. Icon + label on the left (140px), value on the right. Click value to edit — blur auto-saves. No form submit. Uses HorizontalField.

Company Info

Company Name
Thilo GmbH
Classification
Company
EIN
716263123
Phone
E-mail

Address

City
Berlin
Street

On this page