Widgets
Form Inputs
Components that collect input from the visitor: Form, Input, Textarea, Select, DatePicker, Checkbox and RadioGroup
Common Form Input Props
Input, Textarea, Select, DatePicker, Checkbox and RadioGroup share these props.
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | — | The field's name. Its current value is stored in the Widget's data under this name. |
required | boolean | false | The form can't be submitted while the field is empty. |
disabled | boolean | false | Greys the field out and blocks input. |
onChangeAction | action | — | Function to run each time the value changes. |
ariaLabel | string | the field's name | Name read by screen readers when no visible label is linked to the field. |
Form
Groups fields and runs one function when the visitor submits them. Put a Button with submit inside to submit the form.
<Form onSubmitAction={{ functionName: "requestReturn" }} gap={3}>
<Label value="Order number" fieldName="orderNumber" />
<Input name="orderNumber" placeholder="QW-10482" required />
<Label value="Reason" fieldName="reason" />
<Textarea name="reason" rows={3} />
<Button label="Request return" submit />
</Form>Props
Form accepts all common layout props, plus:
| Prop | Type | Default | Description |
|---|---|---|---|
direction | row | col | col | Direction of the form's children. |
onSubmitAction | action | — | Function to run on submit. Every field's value is saved under its name first, so the function can use them all. |
The browser checks the fields before onSubmitAction runs. A field that is required and empty, or that doesn't match its pattern or its inputType (an invalid email address, for example), stops the submit and the browser points to it. A Button with its own onClickAction and no submit runs its function without these checks.
Input
A single-line text field for short answers such as an email address, a name or an order number.
<Input name="email" inputType="email" placeholder="you@example.com" required />Props
In addition to the common props, Input accepts:
| Prop | Type | Default | Description |
|---|---|---|---|
inputType | text | email | password | number | tel | url | text | Kind of value. It sets the keyboard on phones and the browser's format check. |
placeholder | string | — | Hint shown while the field is empty. |
defaultValue | string | — | Starting value. |
value | string | — | Value bound to the Widget's data. |
pattern | string | — | A regular expression the value must match. |
variant | outline | soft | outline | outline draws a border; soft uses a tinted fill. |
size | 3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xl | md | Field height, from 22 px (3xs) to 48 px (3xl). md is 32 px. |
gutterSize | 2xs | xs | sm | md | lg | xl | matches size | Inner horizontal padding, from 6 px to 16 px. |
pill | boolean | false | Fully rounded ends. |
autoFocus | boolean | false | Puts the cursor in the field when the Widget appears. |
autoSelect | boolean | false | Selects the field's text when it gets focus. |
allowAutofillExtensions | boolean | false (true for password) | Lets password managers and autofill extensions fill the field. |
Textarea
A multi-line field for longer answers, such as a message or a reason.
<Textarea name="message" placeholder="Tell us what happened" rows={4} autoResize />Props
In addition to the common props, Textarea accepts:
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | — | Hint shown while the field is empty. |
defaultValue | string | — | Starting value. |
value | string | — | Value bound to the Widget's data. |
rows | number | 3 | Visible lines. |
autoResize | boolean | false | Grows with the text instead of showing a resize handle. |
maxRows | number | 10 | With autoResize, the most lines it grows to before scrolling. |
variant | outline | soft | outline | Visual style. |
size | 3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xl | md | Size. |
gutterSize | 2xs | xs | sm | md | lg | xl | matches size | Inner horizontal padding. |
autoFocus | boolean | false | Puts the cursor in the field when the Widget appears. |
autoSelect | boolean | false | Selects the text when the field gets focus. |
allowAutofillExtensions | boolean | false | Lets autofill extensions fill the field. |
Select
A dropdown for choosing one option, with optional search and a clear button.
<Select
name="size"
placeholder="Choose a size"
options={[
{ label: "Small", value: "s" },
{ label: "Medium", value: "m", description: "Fits most" },
{ label: "Large", value: "l", disabled: true }
]}
block
/>Props
In addition to the common props, Select accepts:
| Prop | Type | Default | Description |
|---|---|---|---|
options | {label, value, disabled?, description?}[] | — | The choices. label is the text shown, or {text, color?, weight?} to style it; value is what's stored. |
placeholder | string | Select | Shown while nothing is chosen. |
defaultValue | string | — | The option chosen at the start. |
value | string | — | Value bound to the Widget's data. |
variant | outline | soft | ghost | outline | ghost has no border or fill until hovered. |
size | 3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xl | md | Size. |
width | number | string | — | Fixed width. |
block | boolean | false | Stretches to the full width of its container. |
pill | boolean | false | Fully rounded ends. |
clearable | boolean | false | Adds a button that clears the choice. |
searchable | boolean | false | Adds a search box that filters the options. |
searchPlaceholder | string | Search... | Hint in the search box. |
searchEmptyMessage | string | No results found. | Shown when the search matches nothing. |
DatePicker
A date field that opens a calendar.
<DatePicker name="pickupDate" placeholder="Pick a date" min="2026-12-02" max="2026-12-31" clearable />Props
In addition to the common props, DatePicker accepts:
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | Select date | Shown while no date is chosen. |
defaultValue | string (yyyy-MM-dd) | — | The date chosen at the start. |
value | string (yyyy-MM-dd) | — | Value bound to the Widget's data. |
min | string (yyyy-MM-dd) | — | Earliest date that can be chosen. |
max | string (yyyy-MM-dd) | — | Latest date that can be chosen. |
variant | outline | soft | ghost | outline | Visual style. |
size | 3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xl | md | Size of the field. |
side | top | bottom | left | right | bottom | Which side the calendar opens on. |
align | start | center | end | center | How the calendar lines up with the field. |
block | boolean | false | Stretches to the full width of its container. |
pill | boolean | false | Fully rounded ends. |
clearable | boolean | false | Adds a button that clears the date. |
Checkbox
A single on/off choice with a label.
<Checkbox name="giftWrap" label="Add gift wrapping" />Props
In addition to the common props, Checkbox accepts:
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Text next to the box. |
defaultChecked | boolean | false | Whether it starts checked. |
checked | boolean | — | Value bound to the Widget's data. |
RadioGroup
A set of options of which the visitor picks exactly one.
<RadioGroup
name="delivery"
defaultValue="standard"
direction="col"
options={[
{ label: "Standard (3–5 days)", value: "standard" },
{ label: "Express (next day)", value: "express" }
]}
/>Props
In addition to the common props, RadioGroup accepts:
| Prop | Type | Default | Description |
|---|---|---|---|
options | {label, value, disabled?}[] | — | The choices. |
defaultValue | string | — | The option chosen at the start. |
value | string | — | Value bound to the Widget's data. |
direction | row | col | row | Side by side, or stacked. |