Textarea

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

npx shadcn@latest add @silicon-ui/textarea
fieldform
Loading…

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. Shared files are skipped if you already have them.

    • components/silicon-ui/textarea/textarea.tsx
    • components/silicon-ui/textarea/textarea.module.css
  3. Install the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

Source codetsx
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