Getting Started

Textarea

A multi-line text input field with support for custom styling and states.

Loading

Installation

pnpm dlx shadcn@latest add @toui/textarea

Examples

Disabled

Loading

Readonly

Loading

Size

Loading

Form

Loading

Pattern

Tokens

10 CSS variables in 4 categories.

px

CSS VariableValueDescription
--textarea-px-smvar(--component-px-sm)
--textarea-px-mdvar(--component-px-md)
--textarea-px-lgvar(--component-px-lg)

py

CSS VariableValueDescription
--textarea-py-sm0.375rem6px — compact
--textarea-py-md0.5rem8px — default
--textarea-py-lg0.625rem10px — large

text

CSS VariableValueDescription
--textarea-text-smvar(--component-text-xs)
--textarea-text-mdvar(--component-text-sm)
--textarea-text-lgvar(--component-text-md)

radius

CSS VariableValueDescription
--textarea-radiusvar(--component-radius-md)

API Reference

This is a custom component that extends the native HTML textarea element.

Textarea

PropTypeDefault
variant enum "md"
className string

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking Accept, you agree to our use of cookies.
Learn more.