Forms & selection@neumorphism-ui/textarea

Textarea

Forwards every native textarea attribute while styling minimum height, vertical resizing, focus, and aria-invalid states with neumorphic tokens.

@neumorphism-ui/textarea
Registry JSON

Preview

Installation

Installation: textareanpx shadcn@latest add @neumorphism-ui/textarea

The CLI resolves npm dependencies, base tokens, utilities, and component source in order.

New to this Registry? Set up the namespace before continuing.

Usage

Usage: Installationnpx shadcn@latest add @neumorphism-ui/label @neumorphism-ui/textarea

Import

Textarea import code
import { Label } from "@/components/ui/label"
import { Textarea } from "@/components/ui/textarea"

Example

Textarea usage code
<div className="grid gap-2">
  <Label htmlFor="note">Note</Label>
  <Textarea
    id="note"
    name="note"
    placeholder="Write a note for your team."
    rows={5}
  />
</div>

API Reference

ComponentPropTypeDefaultDescription
Textareavalue / defaultValuestring—The controlled text or initial uncontrolled text.
Textarearowsnumber—The initial number of visible rows.
Textareaplaceholderstring—A short example that helps communicate the expected input format.
Textareadisabled / required / readOnlybooleanfalseSets native input constraints.
Textareaaria-invalidboolean | string—Enables the error border and focus ring.

Accessibility

  • 01

    Connect Label htmlFor to the Textarea id, and do not replace Label with a placeholder.

  • 02

    When enforcing a character limit, provide maxLength and the current character count, connecting them with aria-describedby when needed.

  • 03

    Give the error message an id and connect it to the control with aria-invalid and aria-describedby.