Component
Input
Render text fields with prefix and suffix slots, validation state, and consistent control sizing.
Interactive preview
Usage
Import the component entry and start with its smallest complete example.
Import
import { Input } from "@chitrank2050/monoline-ui/input"Basic usage
<Input placeholder="Search projects..." />
<Input size="sm" placeholder="Small input" />
<Input size="lg" placeholder="Large input" />
<Input variant="error" placeholder="Invalid value" />
<Input prefix="🔍" placeholder="Search docs..." />
<Input suffix="USD" placeholder="0.00" />Usage guidance
Choose the component for its interaction model and semantics before customizing its appearance.
Input covers a single native text field with optional prefix, suffix, sizing, and error styling.
The field needs multiple lines, composite selection, or built-in validation messages.
Input wraps the native input in a label but provides no built-in label text, so supply an accessible name and describe errors with aria-invalid and aria-describedby when applicable.
This component can render without adding a Monoline client boundary when its children and props are serializable.
API reference
Props, slots, and callbacks available on this component.
Design tokens
Theme variables this component reads for color, spacing, and motion.
Implementation
The source used by the example above, including any state it needs.
import { Input } from "@chitrank2050/monoline-ui/input"
export function Form() {
return (
<div className="flex flex-col gap-3 max-w-sm">
<Input prefix="@" placeholder="Username" />
<Input placeholder="Enter password" type="password" />
</div>
)
}Related documentation
Compare related components or review the package and theme setup.