Y2K UI

Input

A flat text input. Thick navy outline, soft pink focus ring, with optional add-ons for leading/trailing icons and prefix/suffix labels.

Basic

input-basic-demo.app

With icons

Pass any React node through leadingIcon or trailingIcon — useful for search bars, password reveals, or action shortcuts.

input-icons-demo.app

With prefix & suffix

Use prefix for currency / symbol labels and suffix for units. They render in a small pastel panel chip so the value stays readable.

input-prefix-suffix-demo.app
RpIDR
$USD
kg
@

Installation

terminal.sh
npx y2kui@latest add input

Usage

import { Input } from "@/components/ui/input";

Props

PropTypeDefaultDescription
leadingIconReactNodeIcon rendered on the left inside a pastel add-on chip.
trailingIconReactNodeIcon rendered on the right inside a pastel add-on chip.
prefixReactNodeShort label shown on the left of the value (e.g. 'Rp', '@', '$').
suffixReactNodeShort label shown on the right of the value (e.g. 'IDR', 'kg', 'USD').
wrapperClassNamestringExtra classes applied to the outer wrapper when add-ons are present.
typestring'text'Native HTML input type.
placeholderstringPlaceholder text.
disabledbooleanfalseDisable the input.
aria-invalidbooleanfalseMark the input as invalid for accessibility.

On this page