Input
A high-quality, unstyled React input component.
A native input element that automatically works with Field.
Usage guidelines
- Form controls must have an accessible name: It can be created using a
<label>element or theFieldcomponent. See the forms guide.
Anatomy
Import the component and use it as a single part:
import { Input } from '@base-ui/react/input';
<Input />;API reference
Root
| Name | Type | Default | Description |
|---|---|---|---|
onValueChangeOptional | Field.Control.Props['onValueChange'] | undefined | — | Callback fired when the `value` changes. Use when controlled. |
defaultValueOptional | Field.Control.Props['defaultValue'] | undefined | — | The default value of the input. Use when uncontrolled. |
valueOptional | React.ComponentProps<'input'>['value'] | undefined | — | The value of the input. Use when controlled. |