ReScript Shadcn
Get started
  • Installation
Components
  • Accordion
  • Alert
  • AlertDialog
  • AspectRatio
  • Attachment
  • Avatar
  • Badge
  • Breadcrumb
  • Bubble
  • Button
  • ButtonGroup
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Command
  • ContextMenu
  • DataTable
  • DatePicker
  • Dialog
  • Direction
  • Drawer
  • DropdownMenu
  • Empty
  • Field
  • HoverCard
  • Input
  • InputGroup
  • InputOtp
  • Item
  • Kbd
  • Label
  • Marker
  • Menubar
  • Message
  • MessageScroller
  • NativeSelect
  • NavigationMenu
  • Pagination
  • Popover
  • Progress
  • RadioGroup
  • Resizable
  • ScrollArea
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Sonner
  • Spinner
  • Switch
  • Table
  • Tabs
  • Textarea
  • Toast
  • Toggle
  • ToggleGroup
  • Tooltip
  • Typography

Textarea

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

Installation#

npx shadcn@latest add @rescript-shadcn/Textarea

Usage#

<Textarea />

Examples#

Field#

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

Enter your message below.

Disabled#

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

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.

Button#

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

@react.component
let make = () => <Textarea placeholder="Type your message here." />
@react.component
let make = () =>
  <Field>
@react.component
let make = () =>
  <Field dataDisabled=true>
@@jsxConfig({version: 4, mode: "automatic", module_: "BaseUi.BaseUiJsxDOM"})

@react.component
@react.component
let make = () =>
  <div className="grid w-full gap-2">