Fields

To build in the app

Brutalist form controls: seven thin wrappers over native elements. The CSS classes .input-brutalist (focus ring, plus .input-error), .checkbox-brutalist (rust when checked, bar when indeterminate), .radio-brutalist (navy) and .switch-brutalist (navy) live in app/globals.css; the look (1px stone-400 border on the text controls, kept on focus, 2px stone-dark on the small marks, surface-muted background, mustard focus outline) is utility classes on the element, as in the catalog.

App: fields (CSS classes + form builder)

Text input

#input

Default, filled, disabled and error, each in a FormField. Click into a field for the mustard focus ring.

Primary contact email for this account.

Managed by your plan.

Please enter a valid phone number.

Textarea

#textarea

Fixed height by default (resize-none); resizable allows vertical dragging.

Drag the corner to resize.

Notes can't be blank.

Select

#select

Native select with the input look, appearance-none and a chevron-down Icon overlaid.

Set on the account.

Choose a sales rep.

Checkbox

#checkbox

Rust when checked. Indeterminate is the select-all state a bulk bar needs (an addition to the catalog).

Without a label, for table select cells

Radio

#radio

Navy when checked. Radios share a name to form a group.

Shipping

Switch

#switch

A native checkbox with role="switch". Navy when on, with a checkmark in the thumb.

Composed form

#form

Four FormFields in two columns that collapse to one at phone width, plus a switch and actions. The frame uses the raw Card classes (rounded-lg border-2 border-stone-dark bg-white p-6); swap for the Card unit once it lands.

Invoices and statements go here.

Please enter a valid phone number.

Props

NameTypeDefaultNotes
Input.errorbooleanfalseError look only; the message is FormField's
Input.disabledbooleanfalsestone-200 fill and border (no edge), stone-light text
Input.typestringtextPlus every native <input> attribute
Select.errorbooleanfalse
Select.children<option>[]—Native select; chevron-down Icon overlaid
Textarea.errorbooleanfalse
Textarea.resizablebooleanfalseresize-y instead of resize-none
Textarea.rowsnumber3
Checkbox.labelReactNode—Omit for a bare input (table select cells)
Checkbox.indeterminatebooleanfalseSet on the DOM node via a ref
Radio.labelReactNode—Group with a shared name
Switch.labelReactNode—Required; role="switch" on a native checkbox
Switch.descriptionReactNode—ui-xs stone-light line under the label
FormField.labelReactNode—
FormField.htmlForstring—The control's id; seeds the -help / -error message ids
FormField.requiredbooleanfalseRust asterisk
FormField.helpReactNode—ui-xs stone-light under the control
FormField.errorReactNode—ui-xs status-error-text; replaces help
FormField.disabledbooleanfalseDims the label