Input
A text input field with error state support and full ARIA wiring.
Preview
Usage
import { Input } from "anexui";
<Input placeholder="Enter your email" />
Copy codeError state
<Input error placeholder="Invalid value" aria-describedby="err" />
<p id="err">This field is required.</p>
Copy codeWith label
import { Label, Input } from "anexui";
<Label htmlFor="name">Name</Label>
<Input id="name" placeholder="Debayan Sen" />
Copy codeInput types
<Input type="text" placeholder="Text" />
<Input type="email" placeholder="you@example.com" />
<Input type="password" placeholder="••••••••" />
<Input type="number" placeholder="42" />
<Input type="search" placeholder="Search…" />
Disabled
<Input disabled value="Read only value" />
Copy codeProps
| Prop | Type | Default | Description |
|---|---|---|---|
| error | boolean | false | Sets aria-invalid, applies error border/ring |
| disabled | boolean | false | Disables the input |
| placeholder | string | — | Placeholder text |
| type | string | "text" | HTML input type |
All standard HTML <input> attributes are accepted.
Accessibility
- Native
<input>element — no ARIA role override needed aria-invalid="true"applied automatically whenerroris set- Pair with
aria-describedbypointing to an error message element - Always associate with a
<Label>viahtmlFor/id