byronwade/ui
Application UI

Forms · Application UI

Input

A styled text input field that wraps Base UI's Input primitive, supporting all native HTML input attributes with consistent focus, disabled, and validation states.

Feature showcase

Installation

Features

  • Native input API

    Forwards standard input attributes while keeping registry styling consistent.

  • Validation-aware styling

    Uses aria-invalid to switch border and focus treatment to destructive tokens.

  • Form composition examples

    Documents labels, icons, adornments, file uploads, and adjacent actions.

API

Props

PropTypeDefaultDescription
typeReact.HTMLInputTypeAttribute"text"The type of the input element (e.g. "text", "email", "password").
classNamestring-Additional CSS classes merged onto the input element.
placeholderstring-Placeholder text shown when the input is empty.
disabledbooleanfalseDisables the input, preventing interaction and applying reduced-opacity styling.
aria-invalidboolean | "true" | "false"-Marks the input as invalid, applying destructive border and ring styles.
valuestring | number | readonly string[]-Controlled value of the input.
onChangeReact.ChangeEventHandler<HTMLInputElement>-Change event handler called when the input value changes.

Exports

ExportKindDescription
InputcomponentStyled Base UI input primitive.

Slots

SlotElementDescription
inputinputRoot input element.

Source and related

FilePath
Componentregistry/ui/input.tsx
Default examplecontent/examples/input/default.tsx
Error examplecontent/examples/input/error.tsx