Skip to main content

Common Form Input Props

Input, Textarea, Select, DatePicker, Checkbox, and RadioGroup all share the following props for handling form data and interaction.
PropTypeDefaultDescription
namestringField name used as the key in form submission data.
requiredbooleanfalseWhether the field must be filled before the form can be submitted.
disabledbooleanfalseDisables the input, preventing user interaction.
onChangeActionactionFunction to run when the value changes. Available on Select, DatePicker, Checkbox, and RadioGroup only.
The name prop on a form input automatically creates a variable in the widget’s data. For example, an <Input name="email" /> creates an email variable that you can reference elsewhere in the widget using {email}, use in template tokens as {{email}}, or check in state conditions.
Make sure each name is unique within a Form to avoid collisions.

Form

A container that groups input components and handles submission. Wrap your inputs inside a Form to collect their values together when the user submits.
<Form onSubmitAction={{ functionName: "submitForm" }}>
  <Input name="email" placeholder="Enter your email" required />
  <Button label="Submit" submit />
</Form>

Props

Form accepts all Box props plus:
PropTypeDefaultDescription
onSubmitActionactionFunction to run when the form is submitted. Receives all field values keyed by name.
Place a Button with the submit prop inside the Form to trigger submission. All inputs within the form will have their values collected automatically.

Input

A single-line text input for collecting short-form data like emails, names, or numbers.
<Input name="email" inputType="email" placeholder="you@example.com" required />

Props

In addition to all common form input props, Input accepts:
PropTypeDefaultDescription
inputTypetext | email | password | number | tel | urltextThe type of data the input accepts. Controls keyboard layout on mobile and browser validation.
placeholderstringHint text displayed when the input is empty.
defaultValuestringInitial value of the input.
variantsoft | outlineoutlineVisual style of the input.
size3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xlmdControls the overall size of the input.
gutterSize2xs | xs | sm | md | lg | xlInner horizontal padding of the input.
patternstringA regex pattern the input value must match for validation.
pillbooleanfalseRenders the input with fully rounded corners.
autoFocusbooleanfalseAutomatically focuses the input when the widget loads.
autoSelectbooleanfalseSelects all text in the input when it receives focus.
allowAutofillExtensionsbooleanfalseAllows browser autofill extensions to interact with the input.

Textarea

A multi-line text input for collecting longer-form content like messages or descriptions.
<Textarea name="message" placeholder="Type your message..." rows={4} />

Props

In addition to all common form input props, Textarea accepts:
PropTypeDefaultDescription
placeholderstringHint text displayed when the textarea is empty.
defaultValuestringInitial value of the textarea.
rowsnumberNumber of visible text lines.
autoResizebooleanfalseAutomatically adjusts the height as the user types.
maxRowsnumberMaximum number of rows the textarea can expand to when autoResize is enabled.
variantsoft | outlineoutlineVisual style of the textarea.
size3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xlmdControls the overall size of the textarea.
gutterSize2xs | xs | sm | md | lg | xlInner horizontal padding of the textarea.
autoFocusbooleanfalseAutomatically focuses the textarea when the widget loads.
autoSelectbooleanfalseSelects all text in the textarea when it receives focus.
allowAutofillExtensionsbooleanfalseAllows browser autofill extensions to interact with the textarea.

Select

A dropdown for choosing one option from a list. Supports search, clearing, and custom option descriptions.
<Select name="country" placeholder="Choose a country" options={countries} />

Props

In addition to all common form input props, Select accepts:
PropTypeDefaultDescription
options{label, value, disabled?, description?}[]The list of options to display in the dropdown.
placeholderstringHint text displayed when no option is selected.
defaultValuestringThe initially selected value.
variantsoft | outline | ghostoutlineVisual style. ghost renders a minimal, borderless appearance.
size3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xlmdControls the overall size of the select.
blockbooleanfalseMakes the select stretch to fill the full width of its container.
pillbooleanfalseRenders the select with fully rounded corners.
clearablebooleanfalseShows a clear button to reset the selection.
searchablebooleanfalseEnables a search field within the dropdown to filter options.
Each option in the options array requires a label (displayed text) and a value (submitted data). You can optionally include disabled to gray out an option or description to show helper text below the label.

DatePicker

A calendar-based date selector rendered inside a popover. Use it for collecting dates with optional min/max constraints.
<DatePicker name="startDate" placeholder="Pick a date" min="2025-01-01" max="2025-12-31" />

Props

In addition to all common form input props, DatePicker accepts:
PropTypeDefaultDescription
placeholderstringHint text displayed when no date is selected.
defaultValuestring (yyyy-MM-dd)The initially selected date.
minstring (yyyy-MM-dd)The earliest selectable date.
maxstring (yyyy-MM-dd)The latest selectable date.
variantsoft | outline | ghostoutlineVisual style. ghost shows a compact, minimal format.
size3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xlmdControls the overall size of the date picker trigger.
sidetop | bottom | left | rightPreferred side for the calendar popover to open.
alignstart | center | endAlignment of the calendar popover relative to the trigger.
blockbooleanfalseMakes the date picker stretch to fill the full width of its container.
pillbooleanfalseRenders the trigger with fully rounded corners.
clearablebooleanfalseShows a clear button to reset the selected date.

Checkbox

A single toggle for boolean choices, rendered with an accompanying label.
<Checkbox name="agree" label="I agree to the terms" />

Props

In addition to all common form input props, Checkbox accepts:
PropTypeDefaultDescription
labelstringText displayed next to the checkbox.
defaultCheckedboolean | stringfalseWhether the checkbox is initially checked.

RadioGroup

A group of radio buttons for selecting exactly one option from a set. Supports horizontal or vertical layout.
<RadioGroup name="plan" options={[
  { label: "Free", value: "free" },
  { label: "Pro", value: "pro" }
]} defaultValue="free" direction="col" />

Props

In addition to all common form input props, RadioGroup accepts:
PropTypeDefaultDescription
options{label, value, disabled?}[]The list of radio options to display.
defaultValuestringThe initially selected value.
directioncol | rowrowControls whether options are stacked vertically or laid out horizontally.
ariaLabelstringAccessible label for the radio group, used by screen readers.