Skip to content

Textarea

A multiline field for notes, descriptions, and longer text.

FieldForm
npx shadcn@latest add @silicon-ui/textarea

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/textarea

Manually

  1. Install the dependencies

    npm install motion
  2. Copy these files into your project

    • components/silicon-ui/textarea/textarea.tsx
    • components/silicon-ui/textarea/textarea.module.css
  3. Add the foundation, once per app, for the design and motion tokens

    npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

usage.tsx
import { Textarea } from "@/components/silicon-ui/textarea/textarea";

API reference

PropTypeDefault
label*string—
descriptionstring—
errorstring—

Also accepts the props of TextareaHTMLAttributes<HTMLTextAreaElement>.

Dependencies

npm
motion
Registry
silicon-motion-tokens