Skip to content

Input

Displays a form input field.

Install

Bash
npx @madeui/cli add input

Usage

TSX
import { Input } from '@/components/ui/input';

<Input placeholder="Email" type="email" />

With label

Disabled

Invalid

Set invalid on Field to show validation errors — the label and error message pick up the invalid styling, and aria-invalid is applied to the input automatically.

File

Use type="file" to create a file input.

With button

Pair Input with Button inside a Field for a search-style input.

API reference

Built on Base UI Input. The tables below cover the props this library adds or changes — every other prop is forwarded to the underlying Base UI part; see the Base UI Input API reference for the full list.

Input

PropTypeDefaultDescription
disabledbooleanfalse
styleStyleXStyles—StyleX styles merged last — always win over the component’s own styles.

All native <input> props (type, placeholder, value, onChange, …) are forwarded.

Was this page helpful?