React Input

The text-entry foundation: Input with optional leading/trailing adornments (icons, static prefixes, kbd hints), Textarea, and the Field wrapper that wires label, help text, and error message together with correct ARIA. Error state colors the border, ring, and message — and the message replaces the help text, so the layout never jumps.

Lowercase, underscores allowed — used as the RTL top-level name.

/

Part number, family, or keyword.

:8443

This key expired on 2026-06-30.

Shown to customers in the download portal.

Installation

npx shadcn@latest add "http://localhost:3000/registry/input.json"

Usage

Loading...

Props

Input

PropTypeDefaultDescription
invalidbooleanfalseError styling + aria-invalid
leadingReact.ReactNode—Adornment before the text (icon, prefix)
trailingReact.ReactNode—Adornment after the text (unit, kbd)

Plus all native <input> attributes. Textarea accepts native <textarea> attributes plus invalid.

Field

PropTypeDefaultDescription
labelstring—Field label
htmlForstring—The control's id; also derives the description id
requiredbooleanfalseShows the required marker
helpstring—Help text under the control
errorstring—Error message; replaces help and turns destructive

New components every week

Get the week's new Kelvin UI components and templates in one short email. No spam, unsubscribe anytime.