Skip to Content

Built by moveinready.casa  and the community

Shadcn Docs

Textarea

Displays a form textarea or a component that looks like a textarea.

Usage

import {Textarea} from "@/components/ui/textarea"; <Textarea placeholder="Enter your message..." />;

Textarea

PropTypeDefaultDescription
variant"shadcn" | "ghost""shadcn"The visual variant style of the textarea.
color"default" | "secondary" | "destructive" | "warning" | "success""default"Sets the focus ring color variant.
borderRadius"none" | "sm" | "md" | "lg" | "xl""md"Sets the border radius of the textarea.
disabledbooleanfalseWhether the textarea is disabled.
loadingbooleanfalseWhether the textarea is in a loading state.
baseClassNamestringundefinedCustom Tailwind classes to apply to the textarea.
childrenReact.ReactNode-The content to display inside the textarea.

Accessibility

The Textarea component includes:

  • Proper multiline text input functionality
  • Focus management with visible focus rings
  • Disabled state support
  • Loading state indicators

Styling

The Textarea component uses Tailwind variants for consistent styling. You can customize the appearance using:

  • variant prop for border and background styles
  • color prop for focus ring color schemes
  • borderRadius prop for corner styling
  • baseClassName prop for custom Tailwind classes
  • disabled and loading props for state-based styling

shadcn-native

Built by moveinready.casa and the community