{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"corded-textarea","title":"Corded Textarea","description":"A multiline Discord-inspired field with validation and a character count.","dependencies":["@base-ui/react"],"registryDependencies":["utils","corded-theme"],"files":[{"path":"registry/default/ui/corded-textarea.tsx","content":"\"use client\"\n\nimport * as React from \"react\"\nimport { Field } from \"@base-ui/react/field\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface CordedTextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> { label?: string; description?: string; error?: string; showCount?: boolean }\n\nexport const CordedTextarea = React.forwardRef<HTMLTextAreaElement, CordedTextareaProps>(({ label, description, error, showCount, maxLength, className, value, defaultValue, onChange, ...props }, ref) => {\n  const [count, setCount] = React.useState(String(value ?? defaultValue ?? \"\").length)\n  return <Field.Root invalid={Boolean(error)} className=\"mana-field mana-field-full-width\">{label ? <div className=\"mana-field-label-container\"><Field.Label className=\"mana-field-label mana-text-sm-semibold\">{label}</Field.Label></div> : null}<div className=\"mana-field-control\"><div className=\"mana-input\" data-multiline data-error={error ? \"\" : undefined}><textarea ref={ref} value={value} defaultValue={defaultValue} maxLength={maxLength} onChange={(event) => { setCount(event.target.value.length); onChange?.(event) }} className={cn(\"mana-textarea-native min-h-28 resize-y\", className)} {...props} /></div><div className=\"mana-field-helper-row mana-text-xs-normal\">{error ? <Field.Error className=\"mana-field-error\">{error}</Field.Error> : description ? <Field.Description className=\"mana-field-helper-text\">{description}</Field.Description> : <span />}{showCount ? <span className=\"mana-character-count\">{count}{maxLength ? `/${maxLength}` : \"\"}</span> : null}</div></div></Field.Root>\n})\nCordedTextarea.displayName = \"CordedTextarea\"\n","type":"registry:ui","target":"components/ui/corded-textarea.tsx"}],"type":"registry:ui"}