{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "textarea", "title": "Textarea", "description": "A textarea component", "files": [ { "path": "registry/cs/ui/textarea/textarea.tsx", "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst TEXTAREA_SIZES = {\n xs: \"px-2 py-1 text-xs min-h-12\",\n sm: \"px-2.5 py-1.5 text-sm min-h-14\",\n md: \"px-3 py-2 text-sm min-h-16\",\n lg: \"px-3 py-2 text-base min-h-20\",\n xl: \"px-4 py-3 text-base min-h-24\",\n}\n\nexport interface TextareaProps extends Omit, \"size\"> {\n /** Textarea size. */\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\n /** Label text above the textarea. */\n label?: string\n}\n\nconst Textarea = React.forwardRef(\n ({ className, size = \"md\", label, id: idProp, ...props }, ref) => {\n const autoId = React.useId()\n const id = idProp ?? autoId\n\n return (\n
\n {label && (\n \n )}\n \n
\n )\n }\n)\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n", "type": "registry:ui" } ], "type": "registry:ui" }