Field

Capture user text input.

Installation

pnpm add @base-ui/react

Examples

Free, accessible React field components built with Base UI for text fields, search boxes, and form validation with focus states.

Base


Label

Add a label above the input to describe the expected value.


Sizes

Display inputs in small, medium, and large sizes.


Icon

Add a search icon on the left side of the input.


Icon Right

Add a search icon on the right side of the input.


Error

Display validation error when the field is empty and required.

Please add a caption to your post


Success

Show a helper message below the input for guidance.

Username is available


Helper

Add descriptive text below the input for additional context.

Format: SKU followed by 6 digits


Disabled

Prevent user interaction with a disabled input field.


Password

Toggle password visibility with a show/hide button.

Must be at least 8 characters


Number Field

Increment and decrement numeric values with stepper controls.