ComponentsForms
Input
A single-line text field with sizes and an invalid state.
A single-line text field with sizes and an invalid state.
<Input placeholder="you@example.com" />The same component at all four levels. Pick the one that fits your project; they share tokens, so they mix.
npm i junco @junco/tailwindimport { Input } from "junco";
<Field label="Email">
<Input type="email" placeholder="you@example.com" />
</Field>Inside a Field, the error is linked with aria-describedby and the input is marked invalid. Type something else to clear it.
Letters, numbers and dashes.
That username is taken.
Input#Also takes every native <input> attribute.
sizeisInvalidtypeclassName| Prop | Type | Default |
|---|---|---|
sizeHeight, padding and font size. | "sm" | "md" | "lg" | "md" |
isInvalidSets aria-invalid and the error border. Inside a Field, setting error does this for you. | boolean | false |
typeNative input type. | string | "text" |
classNameExtra classes. | string | – |
| Key | Action |
|---|---|
| Tab | Moves focus into and out of the field. |