{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "input",
  "title": "Input",
  "author": "zyx1121 (https://github.com/zyx1121)",
  "description": "Text input, 40px tall to match Button.",
  "dependencies": [
    "@base-ui/react",
    "cn"
  ],
  "registryDependencies": [
    "https://ui.zyx.tw/r/utils.json",
    "https://ui.zyx.tw/r/frame.json",
    "https://ui.zyx.tw/r/field-trigger.json"
  ],
  "files": [
    {
      "path": "registry/zyx/components/ui/input.tsx",
      "content": "import * as React from \"react\"\nimport { Input as InputPrimitive } from \"@base-ui/react/input\"\n\nimport { cn } from \"../../lib/utils\"\nimport { fieldFrameClassName } from \"./field-trigger\"\nimport { FrameEdges } from \"./frame\"\n\nconst inputClassName =\n  \"h-10 w-full min-w-0 bg-transparent px-3 text-body outline-none file:h-full file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n\n// Same height as Button so they line up in a row. The field is a box around\n// the input that carries the glyph frame, so className sizes and places the\n// field; bare drops the box for an input that sits inside another field.\nfunction Input({\n  className,\n  type,\n  bare = false,\n  ...props\n}: React.ComponentProps<\"input\"> & { bare?: boolean }) {\n  if (bare) {\n    return (\n      <InputPrimitive\n        type={type}\n        data-slot=\"input\"\n        className={cn(inputClassName, className)}\n        {...props}\n      />\n    )\n  }\n  return (\n    <span\n      data-slot=\"input-field\"\n      className={cn(\n        \"group/field relative flex w-full min-w-0 rounded-control\",\n        className\n      )}\n    >\n      <InputPrimitive\n        type={type}\n        data-slot=\"input\"\n        className={cn(inputClassName, type === \"color\" && \"cursor-pointer p-1\")}\n        {...props}\n      />\n      <FrameEdges className={fieldFrameClassName} />\n    </span>\n  )\n}\n\nexport { Input }\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "useWhen": "One line of text.",
    "notFor": "Several lines; use textarea.",
    "related": [
      "label",
      "input-group"
    ]
  },
  "docs": "Use when: One line of text.\nNot for: Several lines; use textarea.\nGuide: https://ui.zyx.tw/input.md",
  "categories": [
    "control",
    "form"
  ],
  "type": "registry:ui"
}