Skip to main content
Theme UI provides a comprehensive set of form components with built-in styling and theme integration.

Input

The Input component is a text input field with theme-aware styling.

Import

Usage

Props

string
default:"'background'"
Theme color key for autofill background color
string
default:"'input'"
Form variant from theme.forms
Input accepts all standard HTML input attributes and Box props.

Default Styles

Examples


Textarea

The Textarea component is a multi-line text input.

Import

Usage

Props

string
default:"'textarea'"
Form variant from theme.forms
Textarea accepts all standard HTML textarea attributes and Box props.

Default Styles

Examples


Select

The Select component is a dropdown select field with a custom arrow icon.

Import

Usage

Props

React.ReactElement
Custom arrow icon element (default is a down chevron)
string
default:"'select'"
Form variant from theme.forms
Select accepts all standard HTML select attributes and Box props.

Default Styles

Examples


Label

The Label component is used to label form inputs.

Import

Usage

Props

string
default:"'label'"
Form variant from theme.forms
Label accepts all standard HTML label attributes and Box props.

Default Styles

Examples


Checkbox

The Checkbox component is a styled checkbox input with custom icons.

Import

Usage

Props

string
default:"'checkbox'"
Form variant from theme.forms
Checkbox accepts all standard HTML input checkbox attributes and Box props.

Default Styles

The checkbox uses custom SVG icons for checked and unchecked states:

Examples


Radio

The Radio component is a styled radio input with custom icons.

Import

Usage

Props

string
default:"'radio'"
Form variant from theme.forms
Radio accepts all standard HTML input radio attributes and Box props.

Default Styles

The radio uses custom SVG icons for checked and unchecked states:

Examples


Switch

The Switch component is a toggle switch input.

Import

Usage

Props

string
Label text for the switch
string
default:"'switch'"
Form variant from theme.forms
Switch accepts all standard HTML input checkbox attributes and Box props.

Default Styles

Examples


Slider

The Slider component is a range input slider.

Import

Usage

Props

string
default:"'slider'"
Form variant from theme.forms
Slider accepts all standard HTML input range attributes and Box props.

Default Styles

Examples


Field

The Field component combines a Label and an input control into a single component.

Import

Usage

Props

string
Text for the Label component
string
Used for the name, id, and htmlFor attributes
React.ElementType
default:"Input"
Form control component to render (Input, Textarea, Select, etc.)
Field accepts all props of the control component specified by the as prop.

Examples

Text Input Field

Textarea Field

Select Field

Complete Form Example

Here’s a complete form using multiple form components: