Input

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.

Variant
Accent
Size

Variants

Four surface styles including sharp bottom-ruled underline and bold display fields.

Adornments & Validation

Compose with icons, Kbd hints, clear buttons, and invalid borders.

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.

PropTypeDefaultDescription
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).
leftElementReactNodeundefinedLeading icon or adornment inside the input.
rightElementReactNodeundefinedTrailing icon, badge, or Kbd hint.
clearablebooleanfalseDisplays a clear button when the input has a value.
invalidbooleanfalseApplies danger border and aria-invalid state.