Text Field
A real <label> linked to a real <input>, with aria-describedby wired up to hint and error text automatically.
Enter a valid email address.
Usage
import { TextField } from "@kernelui/react";
<TextField label="Email address" type="email" />Props
| Prop | Type | Default |
|---|---|---|
label | ReactNode (required) | — |
description | ReactNode | — |
errorMessage | ReactNode | — |
invalid | boolean | false |
size | "sm" | "md" | "lg" | "md" |
Accessibility
- Clicking the label focuses the input, that's a native label/input association, not a click handler.
:user-invalidhandles live validation styling after the user has interacted with the field, with no blur-tracking JavaScript.- The
invalidprop is for validation you already know about, like a failed server response, before the user has touched anything.