Skip to content

Textarea

Components5.8.2

Textarea

Component represents native textarea tag and takes all its properties such as value and defaultValue.

import Textarea from '@semcore/ui/textarea';
<Textarea />;
typeTextareaProps
BoxProps & WithAutoFocusEnhanceProps & {...}
PropertyDescription
value
string

Text value of textarea

defaultValue
string

Default value if value property is not provided

size
"m" | "l" | false = m

Textarea size

state
"normal" | "invalid" | "valid" | false = normal

The value responsible for the component state

resize
Property.Resize | "auto" = none

Value responsible for resizing textarea

minRows
number = 2

Value responsible for the minimum number of rows in recalculation

maxRows
number

Value responsible for the maximum number of rows in recalculation

onChange
(value: string, event: SyntheticEvent<HTMLTextAreaElement>) => void

Handler to change the value