Fluxo UIFluxo UIv0.4.1

TextArea

A flexible textarea component with auto-resize, character counting, and validation support.

Basic Usage

Basic TextArea

Basic Example
import { TextArea } from 'fluxo-ui';

function MyComponent() {
  const [value, setValue] = useState('');

  return (
    <TextArea
      label="Description"
      placeholder="Enter your description..."
      value={value}
      onChange={(e) => setValue(e.target.value)}
    />
  );
}

With Character Limit

TextArea with Character Limit

0/150
<TextArea
  label="Bio"
  placeholder="Tell us about yourself..."
  value={value}
  onChange={(e) => setValue(e.value)}
  maxLength={150}
/>

Auto Resize

Auto-resizing TextArea

<TextArea
  label="Comments"
  placeholder="Start typing and watch it grow..."
  value={value}
  onChange={(e) => setValue(e.target.value)}
  autoResize
  rows={2}
/>

Row Heights

Different Row Heights

<TextArea label="Short (2 rows)" rows={2} placeholder="2 rows high" />
<TextArea label="Medium (4 rows)" rows={4} placeholder="4 rows high" />
<TextArea label="Tall (8 rows)" rows={8} placeholder="8 rows high" />

States

TextArea States

<TextArea label="Normal" placeholder="Normal state" value={value} onChange={(e) => setValue(e.value)} />
<TextArea label="Disabled" placeholder="Disabled state" value={value} onChange={(e) => setValue(e.value)} disabled />
<TextArea label="Read Only" value="This is read-only content" readonly onChange={(e) => setValue(e.value)} />
<TextArea label="Required" placeholder="Required field" value={value} onChange={(e) => setValue(e.value)} required />
<TextArea label="With Error" error="This field is required" value={value} onChange={(e) => setValue(e.value)} />

Import

import { TextArea } from 'fluxo-ui';

Props

value
string

Current value of the textarea (controlled)

placeholder
string

Placeholder text

label
string

Label text

error
string | boolean

Error message string (also marks invalid). Pass `true` to mark invalid without a message

invalid
boolean

Force the field into an invalid state without an error message

helperText
ReactNode

Helper text rendered under the input and linked via aria-describedby

disabled
booleanfalse

Disable the textarea

readonly
booleanfalse

Make the textarea read-only

required
booleanfalse

Mark the textarea as required

autoFocus
booleanfalse

Auto focus the textarea on mount

rows
number3

Number of visible rows

autoResize
booleanfalse

Auto resize height based on content

maxHeight
string"200px"

Maximum height for auto-resizing

maxLength
number

Maximum character limit

minLength
number

Minimum character requirement

id
string

Unique identifier for the textarea

name
string

Name attribute for the textarea

onChange
function

Change event handler

className
string

Additional CSS classes

Features

Auto Resize

Expands vertically as the user types, up to an optional maxHeight

Character Counter

Shows remaining characters when maxLength is set

Row Control

Set the initial visible height with the rows prop

Validation States

Supports error messages, required marking, disabled and readonly modes

Accessibility

Proper label association, aria-required, aria-invalid and aria-describedby wiring

Theming

Full dark/light + 5 brand themes via CSS variables — zero extra config