Input
Text inputs allow users to enter and edit text. Supports labels, icons, dropdowns, leading text, trailing buttons, error states, and multiple sizes.
Default
A basic input with label, hint text, and required indicator.
Default Input
Disabled
A disabled input that cannot be interacted with.
Disabled
Invalid / Error
Pass an error prop to show validation state with a red border and error message.
Error State
Sizes
Three sizes: sm (36px), md (44px), and lg (52px).
Small / Medium / Large
Leading Icon
An icon positioned inside the left of the input field.
Leading Icon
Leading Dropdown
A dropdown selector on the left side, useful for country codes or prefixes.
Leading Dropdown
Trailing Icon
An interactive icon on the right, such as a password visibility toggle.
Trailing Icon (Password Toggle)
Trailing Dropdown
A dropdown on the right side, useful for currency or unit selectors.
Trailing Dropdown
Leading Text
A static text prefix inside the input, such as a URL protocol.
Leading Text
Payment Input
A card number input with a leading card icon and trailing card brand indicator.
Payment Input
Trailing Button
An action button attached to the right edge of the input.
Trailing Button
Usage
Import the Input component and configure with props.
import { Input } from "@/components/ui/Input";
// Basic
<Input label="Email" placeholder="you@example.com" required />
// With leading icon
<Input
label="Search"
placeholder="Search..."
leadingIcon={<SearchNormal1 size={16} variant="Bulk" />}
/>
// With trailing button
<Input
label="Subscribe"
placeholder="Enter email"
trailingButton={<button>Subscribe</button>}
/>
// With leading text
<Input label="Website" placeholder="yoursite.com" leadingText="https://" />
// With leading dropdown
<Input
label="Phone"
placeholder="(555) 000-0000"
leadingDropdown={<button>US ▾</button>}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | — | Label text above the input. |
| error | string | — | Error message. Replaces hint when present. |
| hint | string | — | Helper/hint text below the input. |
| helperText | string | — | Alias for hint (backward compatible). |
| inputSize | "sm" | "md" | "lg" | "md" | Input height size. |
| required | boolean | false | Show required asterisk on label. |
| disabled | boolean | false | Disable the input. |
| leadingIcon | ReactNode | — | Icon positioned inside the left of the input. |
| trailingIcon | ReactNode | — | Icon positioned inside the right of the input. |
| leadingDropdown | ReactNode | — | Dropdown element on the left (e.g. country code). |
| trailingDropdown | ReactNode | — | Dropdown element on the right (e.g. currency). |
| leadingText | string | — | Static text prefix (e.g. 'https://'). |
| trailingButton | ReactNode | — | Button element on the right edge. |
| wrapperClassName | string | — | Additional CSS class for the wrapper. |