Components

TextArea

Collects multiline input with optional validation styling.

tsx
import TextArea from '@precursor/textarea';

Example

tsx
'use client';
import { useState } from 'react';
import TextArea from '@precursor/textarea';
import Label from '@precursor/label';
export default function Example() {
    const [note, setNote] = useState('');
    return (
        <>
            <Label htmlFor="review-note">Review note</Label>
            <TextArea
                id="review-note"
                name="note"
                value={note}
                onChange={(event) => setNote(event.currentTarget.value)}
            />
        </>
    );
}

Props

TextArea props
PropTypeDefaultNotes
classNamestring——
aria-describedbystring——
aria-invalidboolean——
disabledboolean——
idRequiredstring——
nameRequiredstring——
placeholderstring——
typestring——
valueRequiredstring——
defaultValuestring——
state"success" | "error" | "warning"——
size"s" | "m" | "l"——
onChangeChangeEventHandler<HTMLTextAreaElement>——