Input
在 Proto UI 上投射的 shadcn 风格单行 Input。
本页面展示 Proto UI 的 draft Shadcn 风格 Base Input 投射。视觉参考为 2026-10-10 抓取的 base-nova Input registry snapshot(registry SHA256 bbad1bba130ac9750a61844eeb8f043e8a710846e07689fa85398b80a46c2741),替换该 draft 先前的 new-york 参考。这是 Proto UI 维护的非官方实现,不代表上游包或官方背书。
单行文本值、controlled/uncontrolled 行为、归一化编辑与 IME 事件、native 文本属性、textbox 命名和描述、disabled/read-only 状态以及 focus/blur 均由 Base Input 所有。Shadcn 层消费这套协议,只增加有界的 field surface、focus-visible ring、disabled 呈现和 dark-scheme 底色。最终仍只有一个 host-owned input[type="text"]。
限定 recipe 使用 32px 高、rounded-lg 圆角、10px 水平内边距、无静止阴影及源码 disabled/dark 配色;当前真实浏览器视觉验收仍待完成。既有静态 selection:bg-primary selection:text-primary-foreground 配色作为明确的 Proto UI 扩展保留,本 base-nova recipe 不含该配色;其他样式变体(如 placeholder:*、响应式 md:*)仍不支持。上游没有自定义文本光标或插入光标颜色,因此此处也仍采用浏览器原生行为。Base Input 没有 invalid state;本投射也不公开任意 type、调用者 className 或 data-slot。它不增加 form/validation workflow、selection API 或第二个编辑器。
可从 @proto.ui/prototypes-shadcn/input 导入 shadcnInputRoot,也可使用包根导出,再适配到目标运行时。CLI 公共组件键为 shadcn-input。