Fields

Complete reference for all available form field components.

Field Types

InputField

The most common field type for text input.

Extends all native HTML input props plus:

PropTypeDescription
namestringForm field name (simple API)
fieldFieldApiField instance (advanced API)
labelReact.ReactNodeField label
descriptionReact.ReactNodeHelper text shown under the label
tooltipReact.ReactNodeInline info icon content (shows on hover/focus)
size"sm" | "md" | "lg"Input and field chrome size
variant"default" | "inline"Input visual variant
childrenReact.ReactNodeAdditional content (help text, etc.)
valueAsNumberbooleanCoerce to number on change; implied when type="number"

TextareaField

Multi-line text input for longer content.

Extends all native HTML textarea props plus:

PropTypeDescription
namestringForm field name (simple API)
fieldFieldApiField instance (advanced API)
labelReact.ReactNodeField label
descriptionReact.ReactNodeHelper text under the label
tooltipReact.ReactNodeInline info icon content
size"sm" | "md" | "lg"Textarea and field chrome size
placeholderstringPlaceholder text
childrenReact.ReactNodeAdditional content (help text, etc.)

CheckboxField

Single checkbox for boolean values.

PropTypeDescription
namestringForm field name (simple API)
fieldBoolFieldApiField instance (advanced API)
labelReact.ReactNodeCheckbox label
descriptionReact.ReactNodeHelper text under the label
tooltipReact.ReactNodeInline info icon content
size"sm" | "md" | "lg"Checkbox and field chrome size
classNamestringAdditional classes

SwitchField

Toggle switch for boolean values.

PropTypeDescription
namestringForm field name (simple API)
fieldBoolFieldApiField instance (advanced API)
labelReact.ReactNodeSwitch label
descriptionReact.ReactNodeHelper text under the label
tooltipReact.ReactNodeInline info icon content
size"sm" | "md" | "lg"Switch and field chrome size
classNamestringAdditional classes

RadioGroupField

Group of radio buttons for single selection from multiple options.

PropTypeDescription
namestringForm field name (simple API)
fieldStringFieldApiField instance (advanced API)
labelReact.ReactNodeField label
descriptionReact.ReactNodeHelper text under the label
tooltipReact.ReactNodeInline info icon content
childrenReact.ReactNodeRadioGroupItem children
classNamestringAdditional classes
size"sm" | "md" | "lg"Radio group and field chrome size

SelectField

Dropdown selection from multiple options.

PropTypeDescription
namestringForm field name (simple API)
fieldStringFieldApiField instance (advanced API)
labelReact.ReactNodeField label
descriptionReact.ReactNodeHelper text under the label
tooltipReact.ReactNodeInline info icon content
labelSize"sm" | "md" | "lg"Form label, description, and message size
items{ label: ReactNode, value: string }[]Label map forwarded to Select; pass it when using the default SelectValue display
childrenReact.ReactNodeCustom SelectTrigger/Value/Content/Items; control size lives on SelectTrigger
classNamestringAdditional classes for the wrapper

DateInputField

Segmented date input bound to form state.

PropTypeDescription
namestringForm field name (simple API)
fieldFieldApi<Date|string|null>Field instance (advanced API)
labelReact.ReactNodeField label
descriptionReact.ReactNodeHelper text under the label
tooltipReact.ReactNodeInline info icon content
size"sm" | "md" | "lg"Date input and field chrome size
localestringOverride the segmented input locale (defaults to 'en-AU')
classNamestringAdditional classes for the wrapper

PhoneField

Phone number input powered by the PhoneInput primitive (with country picker, search and flags). Stores values in canonical E.164 format. Defaults to AU for national input and supports international entry via leading +.

Note

  • Includes a country selector combobox with flags and search; defaultCountry sets the initial country.
  • Stores values in E.164 (canonical). With AU as default, entering 04xx… is saved as +61 4xx…; a leading + always accepts international.
  • Built-in validation runs on blur using the phone library; an "Invalid phone number" message is shown until the number is valid, and cleared when empty/valid. Errors render like other fields via the form chrome.
  • You can still add extra schema rules (e.g., AU-only mobiles) if needed.
PropTypeDescription
namestringForm field name (simple API)
fieldStringFieldApiField instance (advanced API)
labelReact.ReactNodeField label
descriptionReact.ReactNodeHelper text under the label
tooltipReact.ReactNodeInline info icon content
size"sm" | "md" | "lg"Phone input and field chrome size
classNamestringAdditional classes for the wrapper
placeholderstringPlaceholder for the phone input
disabledbooleanDisable the input
readOnlybooleanMake the input read-only
defaultCountrystringISO 3166-1 alpha-2 country code used for national input (default: AU)

TagInputField

Multi-value input for managing tags (chips). Wraps the TagInput primitive and binds it to form state.

PropTypeDescription
namestringForm field name (simple API)
fieldTagsFieldApi | StringsFieldApiField instance (advanced API)
labelReact.ReactNodeField label
descriptionReact.ReactNodeHelper text under the label
tooltipReact.ReactNodeInline info icon content
size"sm" | "md" | "lg"Tag input and field chrome size
options{ id: string; label: string }[]Predefined selectable tags
placeholderstringPlaceholder for the input
classNamestringAdditional classes for the wrapper
allowDuplicatesbooleanAllow duplicate tag labels (default: false)
enableExcelPastebooleanSplit pasted CSV/TSV/newlines into tags (default: true)
enableCommaDelimiterbooleanComma key creates a tag (default: true)
pasteDelimitersstring[]Delimiters used when splitting pasted text
asStringsbooleanBind to string[] instead of Tag[]

When provided, these sync the TagInputField’s tags to a string[] URL parameter via TanStack Router search params.

PropTypeDefaultDescription
paramNamestringURL parameter name to sync. Enables URL state management.
onUrlValueChange(value: string[]|null) => voidCallback when URL parameter value changes.
paramClearOnDefaultbooleantrueRemove URL param when value equals default.
paramThrottlenumberThrottle URL updates in milliseconds.
paramDebouncenumberDebounce URL updates in milliseconds.

SliderField

Range slider for numeric values.

PropTypeDescription
namestringForm field name (simple API)
fieldNumberFieldApiField instance (advanced API)
labelReact.ReactNodeField label
descriptionReact.ReactNodeHelper text under the label
tooltipReact.ReactNodeInline info icon content
valueLabelboolean | React.ReactNode | ((props: {value: string}) => ReactNode)Show current value
minnumberMinimum value
maxnumberMaximum value
stepnumberStep increment

AutocompleteField

Text input with real-time suggestions and filtering. Wraps the Autocomplete primitive and binds it to form state.

PropTypeDescription
namestringForm field name (simple API)
fieldStringFieldApiField instance (advanced API)
labelReact.ReactNodeField label
descriptionReact.ReactNodeHelper text under the label
tooltipReact.ReactNodeInline info icon content
size"sm" | "md" | "lg"Autocomplete input and field chrome size
itemsT[]Array of items to display. Required
itemToString(item: T) => stringConvert item to display string. Required
itemToKey(item: T) => stringGet unique key for each item (defaults to itemToString)
placeholderstringPlaceholder text
emptyMessagestringMessage shown when no items match (default: "No results found.")
disabledbooleanDisable the autocomplete
requiredbooleanMark the field as required (adds aria-required)
readOnlybooleanMake the autocomplete read-only
autoFocusbooleanAuto-focus the input on mount
compactbooleanHide label, description, and error messages
classNamestringAdditional classes for the wrapper

Note: This field also accepts all props from the underlying Autocomplete primitive (e.g., autoHighlight, filter, open, onOpenChange). See the Autocomplete documentation for full details.

Compact Mode

Use compact for dense layouts like data grids where you want just the input without chrome:

// Standard mode - shows label, description, errors
<InputField name="email" label="Email" description="Your work email" />

// Compact mode - input only, no chrome
<InputField name="email" compact />

Compact mode is primarily used internally by the FormBuilder.Bulk grid component for inline editing.

Dual Prop API

All field components accept either:

  • name: Automatically binds to form context (recommended for most use cases)
  • field: Direct field API control (for advanced scenarios)
Prop APIUse CaseExample
nameStandard fields, clean syntax&lt;InputField name="email" label="Email" /&gt;
fieldCustom logic, validation state access&lt;form.Field name="email"> {(field) =&gt; &lt;InputField field={field} /&gt;} &lt;/form.Field&gt;

On this page