Input
One line of text.
We never share it.
Enter a postcode, like SW1A 1AA.
import { Input } from '@rajatweb/argent'
<Input
label="Email"
type="email"
error={error}
onValueChange={setEmail}
/>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
label required | string | ||
defaultValue | string | ||
disabled | boolean | ||
error | string | Error text. Also marks the field invalid. | |
hint | string | Help text under the field. | |
onValueChange | (value: string) => void | ||
placeholder | string | ||
required | boolean | ||
size | 'sm' | 'md' | 'lg' | 'md' | |
value | string |
Accessibility
- The label, hint and error are tied to the field.
- An error also marks the field invalid on the web.
Do
- Say how to fix the error.
Don’t
- Use the placeholder as a label.