About
A single-line text input with sm/md/lg size variants, prefix/suffix slots, a clearable button, and mono/tabular numerals for IDs and ports — ported to React from hemingtsai's Zemponet Vue UI library (MIT licensed).
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds ZInput to your project and fits it to your theme.
Code
How ZInput is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import * as React from "react";
import ZInput from "@/components/ui/zinput";
export default function ZInputStatesDemo() {
return (
<div
className="w-full max-w-sm"
style={{ display: "flex", flexDirection: "column", gap: 8 }}
>
<ZInput disabled value="需要管理员权限" onChange={() => {}} />
<ZInput
readOnly
value="config.toml(由启动参数覆盖)"
onChange={() => {}}
/>
</div>
);
}














![Form [react-aria-components]](https://cdn.21st.dev/cdn-cgi/image/fit=scale-down,width=640,quality=75,format=webp/https://cdn.21st.dev/user_jolbol1/field/814/preview.png)