Forms & Inputs
Input
Single-line text field with an optional leading icon and inline error.
A single-line text field. It renders the canonical input styling, supports an optional leading icon, and shows an inline error message (which also switches the border to the error style). Every native <input> attribute spreads through.
Import
import { Input } from "@yuhuanowo/yunui";
Basic
Basic
With icon
With a leading icon
Error state
With an error message
Enter a valid email address.
Disabled
Disabled
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| error | string | — | Error message shown below the field; also switches the border to a red error style. |
| icon | ReactNode | — | Leading icon rendered inside the field on the left. |