Textarea preview

Interactive preview of the CyberSpec Textarea component. A labelled multi-line input with a character count.

About this preview

Textarea belongs to the Fields group in the CyberSpec catalog. It uses @ui-sdk/react/textarea, @ui-sdk/react/field.

Installation

Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.

bunx --bun shadcn@latest add https://www.cyberspec.dev/r/textarea.json

Example

"use client"

import { Textarea } from "@/components/ui/textarea"

export default function TextareaDemo() {
  return (
    <>
      <Textarea
        label="Job brief"
        maxLength={240}
        defaultValue="Pickup at Cinder Row, dock 4. One sealed Vanta Mk.II deck. Hand it to Mara Voss in Glasswater before 04:00. Don't power it on."
        hint="The runner sees this before accepting."
      />
      <Textarea label="Sign-off" maxLength={32} rows={1} defaultValue="Route cleared. Paid on delivery" />
    </>
  )
}

Install this example

bunx --bun shadcn@latest add https://www.cyberspec.dev/r/textarea-demo.json

Resources

View as Markdown