import Input from '@precursor/input';Example
Use a work address.
import Input from '@precursor/input';
export default function Example() {
return (
<>
<label htmlFor="email">Email</label>
<Input
id="email"
name="email"
type="email"
placeholder="you@example.com"
aria-describedby="email-help"
/>
<small id="email-help">Use a work address.</small>
</>
);
}
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
className | string | — | — |
aria-describedby | string | — | — |
aria-invalid | boolean | — | — |
disabled | boolean | — | — |
id | string | — | — |
nameRequired | string | — | — |
placeholder | string | — | — |
type | InputTypes | 'text' | — |
defaultValue | string | — | — |
value | string | — | — |
checked | boolean | — | — |
state | "success" | "error" | "warning" | — | — |
size | "s" | "m" | "l" | — | — |
onChange | ChangeEventHandler<HTMLInputElement> | — | — |