Skip to content

Text Area

Accepts multiline text input from users.

No props are required to display <TextArea>, but it’s recommended to provide a label for accessibility.

import { TextArea } from "stylus-ui/TextArea";
export default () => <TextArea label="Bio" />;

To display additional info beneath the input, pass in helpText.

Tell teammates what you do.

import { TextArea } from "stylus-ui/TextArea";
export default () => (
<TextArea label="Bio" helpText="Tell teammates what you do." />
);

When displaying an input in a space-constrained location, you can pass small, which decreases the padding and font size and sets a smaller minimum height.

Tell teammates what you do.

import { TextArea } from "stylus-ui/TextArea";
export default () => (
<TextArea label="Bio" helpText="Tell teammates what you do." small />
);

When displaying an error message, pass error to highlight the input in red.

Tell teammates what you do.

import { TextArea } from "stylus-ui/TextArea";
export default () => (
<TextArea label="Bio" helpText="Tell teammates what you do." error />
);

Placeholder text may be used to provide an example of input to the user.

import { TextArea } from "stylus-ui/TextArea";
export default () => <TextArea label="Bio" placeholder="What do you do?" />;
import { TextArea } from "stylus-ui/TextArea";
export default () => <TextArea label="Bio" disabled />;

By default, <TextArea> can be dragged from the corner to vertically resize the input. To disable this, pass resize={false}. Notice the lack of a drag handle in the bottom right.

import { TextArea } from "stylus-ui/TextArea";
export default () => <TextArea resize={false} />;

Inherits properties from HTMLTextAreaElement.

Prop
Type
Default
disabled boolean false
error boolean false
helpText string
label string
resize boolean true
small boolean false
theme "light""dark" "light"