OPUS/UI

Navigation

Input

Text input with prefix/suffix adornments, a clear button, password reveal and automatic Field wiring.

4 files · 265 locdeps: clsx, tailwind-merge
/
https://.com

We’ll link it from your public profile.

Forgot?

Installation

With the shadcn CLI, pointing at this platform’s registry:

npx shadcn@latest add https://opusui.131199999.xyz/r/input.json

Or offline, straight from your opus55 checkout (copies every file it needs):

node ../tailwind_component/opus55/scripts/add.mjs input

Usage

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

<Input prefix={<SearchIcon />} placeholder="Search…" clearable />

API

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"Height and text size.
prefix / suffixReactNode—Leading / trailing adornment (icon, unit, Kbd).
clearableboolean—Show × when there is a value; fires a real input event so controlled state updates.
invalidboolean—Error styling. Set automatically inside <Field error>.
wrapperClassNamestring—Classes for the outer shell; `className` goes to the <input>.

Command palette