Input
Text field primitive with leading/trailing adornments, clearable action, validation styling, and three surface variants.
Interactive Playground
Test variants, sizes, invalid state, and clearable controls.
input-playground.tsx
Variant
Accent
Size
Variants
Four surface styles including sharp bottom-ruled underline and bold display fields.
input-variants.tsx
Adornments & Validation
Compose with icons, Kbd hints, clear buttons, and invalid borders.
input-adornments.tsx
CtrlK
Quick Import
Example.tsxtsx
1import { Input } from "@rekodo/react";2
3export function Example() {4 return <Input placeholder="Search vinyl records..." clearable />;5}API Reference
Props accepted by this component.
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "default" | "subtle" | "ghost" | "underline" | "default" | Visual surface style of the input wrapper, including sharp bottom-ruled underline. |
| accent | "violet" | "rose" | "violet" | Focus border and ring accent color. |
| size | "sm" | "default" | "lg" | "display" | "default" | Height, horizontal padding, and text scale (use display for oversized italic handles). |
| leftElement | ReactNode | undefined | Leading icon or adornment inside the input. |
| rightElement | ReactNode | undefined | Trailing icon, badge, or Kbd hint. |
| clearable | boolean | false | Displays a clear button when the input has a value. |
| invalid | boolean | false | Applies danger border and aria-invalid state. |