62/180
The field grows as you type.
Installation
$ pnpm dlx shadcn@latest add @synccn/textareaFirst time in this project? Connect synccn with one command.
Usage
import { Textarea } from "@/components/ui/textarea";<Textarea maxLength={180} />API reference
Generated from the component's TypeScript types, so it always matches the code.
PropTypeDescription
- autoGrow
booleanDefault
trueGrow with the content.
- className
stringExtra classes for the root element.
Also accepts every standard <textarea> attribute, and forwards its ref.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Helpers
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
Accessibility
From the source
Read from this component's code when the site builds, so it can't drift.
- Shows a visible focus ring for keyboard users
More inputs
ButtonSeven variants, four sizes and a built-in loading state.InputText field with optional leading icon and invalid state.CheckboxChecked, unchecked and indeterminate, with label and description.SwitchToggle with a springy thumb in three sizes.Radio GroupPick one option, shown as dots or as selectable cards.SliderSingle value or range, with keyboard steps and value bubbles.