Skip to content

Textarea

Surface for accepting multi-line user input
import { Textarea } from '@ensdomains/thorin'
<Textarea
label="Why are you entering $WRITE Race?"
placeholder="Share your story…"
/>

Props
#

name
type
default
description
autoCorrect
string
-
If true, the input will automatically correct words it marks as spelling errors.
autoFocus
boolean
-
If true, the component will attempt to get focus after it is rendered.
defaultValue
string | number
-
The initial value. Useful for detecting changes in value.
description
ReactNode
-
Description text or react component.
disabled
boolean
-
If true, prevents user interaction.
error
ReactNode
-
Error text or a react component.
hideLabel
boolean
-
If true, hides the label and secondary label.
id
string
-
The id attribute of the textarea element.
label*
Required
ReactNode
-
Label text or react component
labelPlacement
"top" | "bottom" | { error?: Placement | undefined; description?: Placement | undefined; }
-
Set the placement of the error and description. Does not affect inline mode.
labelRight
boolean
-
Have lavel appear on the right of the form element.
labelSecondary
ReactNode
-
Secondary text or react component
maxLength
number
-
The maximum number of characters allowed.
name
string
-
The name attribute of the textarea element.
placeholder
string
-
The placeholder attribute for textarea.
readOnly
boolean
-
The readOnly attribute for textarea.
ref
Ref<HTMLTextAreaElement>
-
-
required
boolean
-
Adds mark to label
rows
number
5
Specifies the height of the text area in rows.
showDot
boolean
-
If true, shows a status dot of the current state of validation
spellCheck
false | true | "true" | "false"
-
Textarea will mark words which it thinks are misspellings.
tabIndex
number
-
The tabindex attribute of textarea.
validated
boolean
-
If true the value of the textarea has been validated
value
string | number
-
The value attribute of textarea.
width
any
-
A tokens space key value setting the width of the parent element.
onChange
ChangeEventHandler<HTMLTextAreaElement>
-
The handler for change events.
onBlur
FocusEventHandler<HTMLTextAreaElement>
-
The handler for blur events.
onFocus
FocusEventHandler<HTMLTextAreaElement>
-
The handler for focus events.

Disabled
#

Read Only
#

Rows
#

Description
#

Error
#

Hide Label
#

Max Length
#

Edit on GitHub