Skip to Content
NarakUI

Textarea

A multi-line text input component for longer text content and messages.

Sizes

regular is the default. small uses smaller text for dense forms and side panels.

Ask it the way a customer would.
Visible to everyone in this workspace.

Error states

Set error for the error style and errorMessage for the text below the field.

Add a brand description.
Keep notes under 500 characters.

Disabled

A disabled textarea can't be focused or edited.

Only admins can edit this.
Notes are locked after a report is shared.

Read only

A read-only textarea can be focused and copied from, but not edited.

Managed by your workspace.
Added by Maya.

Chromeless

variant="chromeless" drops the field's background, border, padding, shadow, and hover tint so the text sits on whatever surface it is embedded in. Reach for it when editing text in place — in a document, a card, or a title row — where a visible input box would read as a form rather than as the text being edited. The surrounding container supplies the affordance instead.

Prefer this over re-styling a control field through contentClassName: the control surface sets dark:, hover:, and focus-visible: classes that a caller's unprefixed overrides cannot reach.

A control field, for comparison

Installation

pnpm dlx shadcn@latest add @narakui/textarea

Add "@narakui": "https://ui.narakcode.dev/r/{name}.json" to components.json, or install directly from https://ui.narakcode.dev/r/textarea.json.

Usage

import { Textarea } from '@/components/ui/textarea';

<Textarea label="Message" placeholder="Enter your message" />
<Textarea size="small" error errorMessage="This field is required" />

Properties

PropTypeDefaultDescription
labelReactNode—Label text for the textarea field
placeholderstring—Placeholder text when textarea is empty
disabledbooleanfalseWhether the textarea is disabled
readOnlybooleanfalseWhether the textarea is read-only
requiredbooleanfalseWhether the textarea is required
size'small' | 'regular''regular'Size of the textarea
variant'control' | 'chromeless''control'Whether the field renders its own surface. 'chromeless' drops the background, border, padding, shadow, and hover tint for editing text in place.
idstring—Native field ID, overridden by inputRest.id. Generated when both are omitted.
hintReactNode—Helper text displayed below the textarea
valuestring—Controlled textarea value
errorbooleanfalseWhether to display the textarea in error state
errorMessagestring—Error message shown below the textarea while error is true
onChange(e: ChangeEvent<HTMLTextAreaElement>) => void—Callback function to handle input change
endLabelReactNode—End label to display below the textarea
fieldSizingbooleantrueWhether to use fixed or content field sizing
classNamestring—Additional CSS classes to apply to the textarea container
contentClassNamestring—Additional CSS classes to apply to the textarea element
inputRestComponentPropsWithoutRef<'textarea'>—Extra props spread onto the native textarea element
containerRefRef<HTMLDivElement>—Ref to the container element