Textarea Controlled

PreviousNext

textarea-controlled-demo

Docs
intentuipage

Preview

Loading preview…
components/docs/forms/textarea/textarea-controlled-demo.tsx
"use client"

import { useState } from "react"

import { Description, Label } from "@/components/ui/field"
import { TextField } from "@/components/ui/text-field"
import { Textarea } from "@/components/ui/textarea"

export default function TextareaControlledDemo() {
  const [value, setValue] = useState("")
  return (
    <TextField value={value} onChange={setValue}>
      <Label>Address</Label>
      <Textarea />
      <Description>
        You have typed: <strong className="text-fg">{value ?? "-"}</strong>
      </Description>
    </TextField>
  )
}

Installation

npx shadcn@latest add @intentui/textarea-controlled-demo

Usage

Usage varies by registry entry. Refer to the registry docs or source files below for details.