Skip to content
Nana UI

Textarea

View .md Download

A <nana-textarea> element.

Terminal window
npm install @nana-tec/ui-components
import "@nana-tec/ui-components/textarea";
<nana-textarea label="Message" placeholder="Write something…" rows="3" style="min-width:18rem"></nana-textarea>

Properties

PropertyAttributeTypeDefaultDescription
autocompleteHTMLTextAreaElement['autocomplete']'off'
autoGrowauto-growbooleanfalse
disabledbooleanfalse
errorMessageerror-messagestring''
helperTexthelper-textstring''
inputId`nana-textarea-${Math.random().toString(36).slice(2, 7)}`
invalidbooleanfalse
labelstring''
maxHeightmax-heightnumber | undefined
maxlengthnumber | undefined
minlengthnumber | undefined
namestring''
placeholderstring''
readonlybooleanfalse
requiredbooleanfalse
rowsnumber4
showWordCountshow-word-countbooleanfalse
spellcheckbooleanfalse
successbooleanfalse
valuestring''
wrapHTMLTextAreaElement['wrap'] | undefined
PartDescription
textareaThe native <textarea> element
counterThe character counter span
  • Keyboard accessible
  • Screen-reader labels
  • Focus-visible states
  • ARIA roles and states
  • WCAG 2.2 AA contrast
Explore Textarea interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook