Skip to Content
Nextra 4.0 is released 🎉

TextArea

The TextArea component provides a pixel-art styled multiline input field for capturing longer text content.
Built to match the retro aesthetic of PixelartUI, it supports labels, error states, helper text, flexible sizing, and multiple style variations.
Whether you’re collecting comments, descriptions, or notes, the TextArea ensures a consistent and nostalgic look across your interface.


Basic Example


<TextArea inputName="name" label="Note" type="main" />

Text area types


<TextArea inputName="name" label="Note" type="main" /> <TextArea inputName="name" label="Note" type="inline" />

Text area custom size


<TextArea inputName="name" label="Note" type="main" width="400px" height="200px" />

Text area fullwidth


<TextArea inputName="name" label="Note" type="main" fullwidth />

Text area placeholder


<TextArea inputName="name" label="Note" type="main" placeholder="The placeholder" />

Text area no label


<TextArea inputName="name" label="Note" type="main" noLabel />

Text area error


<TextArea inputName="name" label="Note" type="main" error />

Text area helper text


help
<TextArea inputName="name" label="Note" type="main" helperText="help" />

Text area disabled


<TextArea inputName="name" label="Note" type="main" disabled />

Text area custom color


<TextArea inputName="name" label="Note" type="main" backgroundColor="#b13737" />

Text area styles


help
help
<TextArea inputName="name" label="Note" type="main" textAreaStyle="dark" /> <TextArea inputName="name" label="Note" type="inline" textAreaStyle="light" />

đź”§ Props

PropTypeDefaultDescription
inputNamestring—A unique name identifier for the TextArea input.
placeholderstringundefinedPlaceholder text displayed when the field is empty.
backgroundColorstringundefinedSets a custom background color for the TextArea.
errorbooleanfalseDisplays the TextArea in an error state.
helperTextstringundefinedDisplays helper or validation text beneath the TextArea.
disabledbooleanfalseDisables the TextArea and visually indicates inactivity.
labelstringundefinedLabel text displayed above the TextArea.
noLabelbooleanfalseHides the label when set to true.
typeTextAreaType—Determines the TextArea’s visual style or theme.
valuestringundefinedThe controlled value of the TextArea.
classNamestringundefinedAdds additional CSS classes for custom styling.
textAreaStyleTextAreaStyleundefinedApplies a predefined PixelartUI style to the TextArea.
widthstringundefinedSets a custom width (e.g., "300px", "100%").
heightstringundefinedSets a custom height for the TextArea.
fullwidthbooleanfalseExpands the TextArea to fill the width of its container.
onChange(event: React.ChangeEvent<HTMLTextAreaElement>) => voidundefinedCallback fired when the TextArea value changes.
Last updated on