Textarea
Surface for accepting multi-line user input
name | type | default | description |
---|---|---|---|
actionIcon | "symbol" | "object" | "label" | "form" | "slot" | "style" | "title" | "textarea" | "small" | "center" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "search" | "script" | "section" | "select" | "source" | "span" | "strong" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "tfoot" | "th" | "thead" | "time" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | ComponentClass<any, any> | FunctionComponent<any> | FunctionComponent<{}> | ComponentClass<{}, any> | - | A replacement icon for the action button |
alwaysShowAction | boolean | false | If true, will show the action button even when there is not input |
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. |
clearable | boolean | false | If true, will show a clear button when the input has value |
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 |
labelSecondary | ReactNode | - | Secondary text or react component |
maxLength | number | - | The maximum number of characters allowed. |
name | string | textarea | The name attribute of the textarea element. |
placeholder | string | - | The placeholder attribute for textarea. |
readOnly | boolean | - | If true, will set the Fields component to read only mode
The readOnly attribute for textarea. |
ref | null | string | (instance: HTMLTextAreaElement | null) => void | RefObject<HTMLTextAreaElement> | - | Allows getting a ref to the component instance.
Once the component unmounts, React will set `ref.current` to `null`
(or call the ref with `null` if you passed a callback ref).
@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
required | boolean | - | Adds mark to label |
reverse | boolean | - | Have label appear on the left of the form element. |
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 |
size | "small" | "medium" | medium | The size of the textarea. |
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 | "auto" | "60vh" | "80vw" | "0" | "unset" | "initial" | "px" | "0.25" | "0.5" | "0.75" | "1" | "1.25" | "1.5" | "1.75" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "6.5" | "7" | "7.5" | "8" | "8.5" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "18" | "20" | "22.5" | "24" | "25" | "26" | "28" | "30" | "32" | "36" | "40" | "44" | "45" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | "112" | "128" | "144" | "168" | "192" | "224" | "256" | "288" | "320" | "1/4" | "1/3" | "1/2" | "2/3" | "3/4" | "full" | "fit" | "max" | "min" | "viewHeight" | "viewWidth" | "none" | "dialogMobileWidth" | "dialogDesktopWidth" | "center" | "-0.5" | "-1.5" | "-4" | "-4.5" | "-6" | "-px" | "-full" | - | A tokens space key value setting the width of the parent element. |
onClickAction | () => void | - | A custom handler that replaces the clear handler |
onChange | ChangeEventHandler<HTMLTextAreaElement> | - | The handler for change events. |
onBlur | FocusEventHandler<HTMLTextAreaElement> | - | The handler for blur events. |
onFocus | FocusEventHandler<HTMLTextAreaElement> | - | The handler for focus events. |