Skip to main content

Textarea

Quick start

Here's a quick start guide to get started with the textarea component

Importing Component

import { TextArea } from "@hover-design/react";

Code Snippets and Examples

Default

<TextArea placeholder="AutoSize"></TextArea>

Fixedsize

<TextArea placeholder="Fixedsize" fixedSize={true}></TextArea>

Rows & Cols

<TextArea placeholder="Rows" rows={5}></TextArea>
<TextArea placeholder="Cols" cols={10}></TextArea>

Maximum & Minimum Length

<TextArea
placeholder="Maximum height"
maxlength={12}
defaultValue="Hover Maximum"
></TextArea>
<TextArea
placeholder="Minimum height"
minlength={10}
defaultValue="Hover Minimum"
></TextArea>

Status Border

<TextArea placeholder="Error" statusBorder="red"></TextArea>
<TextArea placeholder="Warning" statusBorder="yellow"></TextArea>
<TextArea placeholder="Valid" statusBorder="green"></TextArea>

Props Referece

AttributesValuesOptional ?
childrenJSX.ElementYes
autocompleteon | offYes
autocorrecton | offYes
autofocusbooleanYes
resizebooleanYes
statusBorderstringYes
colsnumberYes
rowsnumberYes
minlengthnumberYes
maxlengthnumberYes
disabledbooleanYes
requiredbooleanYes
namestringYes
placeholderstringYes
readonlybooleanYes
spellchecktrue | default | falseYes
wraphard | soft | offYes
onChange() => void;Yes