Input

Labelled text field that lights up on focus, draws a check when you mark the value as good, and gives one quick flicker on error. Supports helper text, icons and a fill-as-you-type underline.

Preview

Props Changes apply to the live preview above.

Installation

npx @lumioui/cli add input

Usage

import { Input } from "@/components/ui/input/input";
<Input />

Examples

Shipping

Shipping step of a fashion-retail checkout, ink only.

Glass

A trip planner's route fields floating over the destination photo: start point and destination as glass capsules.

API reference

Prop Type Default
label string

Visible label above the field.

—
helper string

Helper text below the field.

—
error string

Error message — turns the field red, flickers it, and announces to screen readers.

—
success boolean

Shows an animated success check on the right edge.

false
leftIcon React.ReactNode

Icon node rendered inside the left edge of the field.

—
rightIcon React.ReactNode

Icon node rendered inside the right edge (hidden while the success check shows).

—
reserveHelperLine boolean

Reserve one helper line even when empty — prevents layout shift on error.

false
size "sm" | "md"

Field density — "sm" for toolbars and dense forms, "md" (default) for full-size fields.

"md"
className string

NativeWind classes for the input element.

—
containerClassName string

Classes for the outer wrapper.

—
glass boolean

Glass field — capsule material instead of the flat fill.

false
validity number

0–1: how close the value is to valid (e.g. postcode chars / 6). Shows a 2px baseline under the text that charges as you type; omit for none.

—