Forms

Textarea

A multi-line text input.

Server safeSource

Import

import { Textarea } from '@the_viveksingh/vivek-ui'

Sizes and resize

<Textarea placeholder="Default, resizable vertically" />
<Textarea size="sm" resize="none" placeholder="Small, resize disabled" />

Inside a Field

Markdown is supported.

<Field label="Release notes" help="Markdown is supported.">
  <Textarea rows={4} placeholder="What changed in this version?" />
</Field>

Invalid

invalid sets aria-invalid as well as the visual state, so both agree.

<Field label="Summary" error="A summary is required.">
  <Textarea invalid rows={3} />
</Field>

Props

Generated from the package's own type declarations, so this table cannot drift from the code.

Props for Textarea
PropTypeDefaultDescription
size'sm' | 'md' | 'lg'
invalidboolean
resize'none' | 'vertical' | 'both'How the user may resize it. Defaults to `vertical`.

Every remaining prop is spread onto the root element, so all standard HTML and ARIA attributes work. className and style are merged with the library's own, never replaced, and the ref forwards to the root DOM node.

Rendering

Server safe

Textarea carries no 'use client' directive and renders directly in a React Server Component. No client JavaScript is shipped for it.