UILab

Textarea

Displays a form textarea or a component that looks like a textarea.

"use client"

import { Textarea } from "uilab-core"

export function TextareaPreview() {
  return <Textarea placeholder="Type your message here." />
}

Usage

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

Examples

Field

Use Field, FieldLabel, and FieldDescription to create a textarea with a label and description.

Enter your message below.

"use client"

import {
  Field,
  FieldDescription,

Disabled

Use the disabled prop to disable the textarea. To style the disabled state, add the data-disabled attribute to the Field component.

"use client"

import { Field, FieldLabel, Textarea } from "uilab-core"

export function TextareaDisabledExample() {

Invalid

Use the aria-invalid prop to mark the textarea as invalid. To style the invalid state, add the data-invalid attribute to the Field component.

Please enter a valid message.

"use client"

import {
  Field,
  FieldDescription,

Button

Pair with Button to create a textarea with a submit button.

"use client"

import { Button, Textarea } from "uilab-core"

export function TextareaButtonExample() {

On this page