TextInput
TextInput
Section titled “TextInput”Default
Section titled “Default”import { TextInput } from '@eekodigital/raster';
<TextInput name="query" placeholder="Search…" /> Error state
Section titled “Error state”<TextInput name="email" type="email" hasError placeholder="name@example.com" /> Disabled
Section titled “Disabled”<TextInput name="ref" defaultValue="INV-0042" disabled /> TextInputField
Section titled “TextInputField”Default
Section titled “Default”import { TextInputField } from '@eekodigital/raster';
<TextInputField label="Project name" name="name" /> With hint
Section titled “With hint”Use a short, memorable name.
<TextInputField label="Project name" name="name" hint="Use a short, memorable name." /> With error
Section titled “With error”Error: Please enter a valid email address.
<TextInputField label="Email" name="email" type="email" error="Please enter a valid email address." /> TextInput
Section titled “TextInput”| Prop | Type | Default | Description |
|---|---|---|---|
hasError | boolean | false | Applies error styling. |
…props | InputHTMLAttributes | — | All native |
TextInputField
Section titled “TextInputField”| Prop | Type | Description |
|---|---|---|
label | string | Visible label text. |
hint | string | Optional hint text below the label. |
error | string | Validation error message. |
…props | InputHTMLAttributes | All native input attributes. |