Warren UI

Textarea

Multi-line text input with Warren Control styling.

Source
"use client"

import { Label } from "@/registry/warren/label/label"
import { Textarea } from "@/registry/warren/textarea/textarea"

export default function TextareaDemo() {
  return (
    <div className="w-full max-w-md border-2 border-border bg-panel p-3">
      <Label htmlFor="mission-transcript">Mission transcript</Label>
      <Textarea
        id="mission-transcript"
        className="mt-1"
        placeholder="CAPTAIN'S LOG, STARDATE 43125.8"
      />
    </div>
  )
}

Installation

npx shadcn@latest add https://warren.eduard3v.com/r/textarea.json

Usage

import { Textarea } from "@/components/ui/textarea"
<Textarea placeholder="CAPTAIN'S LOG, STARDATE 43125.8" />

States

Disabled and invalid states are driven by the underlying <textarea> props: disabled dims the field, and aria-invalid swaps the border to the danger tone.

Source
"use client"

import { Textarea } from "@/registry/warren/textarea/textarea"

export default function TextareaStates() {
  return (
    <div className="flex flex-wrap items-start gap-3">
      <Textarea className="w-64" placeholder="EDITABLE TRANSCRIPT" />
      <Textarea className="w-64" placeholder="DISABLED" disabled />
      <Textarea className="w-64" placeholder="INVALID INPUT" aria-invalid />
    </div>
  )
}

Case

Values render uppercase by default (caps, default true). Set caps={false} when case matters — email bodies, pasted logs, free text — so the display matches the submitted value.

API Reference

Prop

Type

Beyond caps, it forwards native <textarea> attributes; TypeScript types are derived from React.ComponentProps<"textarea">. All native attributes are supported (placeholder, rows, disabled, aria-invalid, onChange, ...).

On this page