Skip to main content

TextArea

The TextArea component is a form control that allows users to enter multiple lines of text, with support for various styles and states.

Basic Usage

import { TextArea, ThemeProvider } from "@carton-org/react-neumorphism";

const MyComponent = () => {
return (
<TextArea
label="Description"
placeholder="Enter your description here..."
/>
);
};

Live Example

Props

NameTypeDescriptionRequiredDefault Value
labelstringLabel text for the TextAreaNo-
placeholderstringPlaceholder text when TextArea is emptyNo-
inputSize"xs" | "sm" | "md" | "lg" | "xl"Size of the TextAreaNo"sm"
disabledbooleanWhether the TextArea is disabledNofalse
textAreaStyleReact.CSSPropertiesCustom styles for the textarea elementNo-
textAreaContainerStyleReact.CSSPropertiesCustom styles for the container elementNo-
textAreaLabelStyleReact.CSSPropertiesCustom styles for the label elementNo-

Examples

States

With Label

With Placeholder

Disabled