Import
import { Textarea } from '@dnb/eufemia'
Description
The Textarea component is used as a multi-line text input control with an unlimited number of characters.
Relevant links
Browser autofill styling
When users insert values using autofill in their browser, the browser applies its own background and text colors. How ever, in contrast to the Input component, Eufemia does overwrite the :autofill
background color because of its wired looking gap around the writing area when autofill is used.
Accessibility
Please avoid using the maxlength
attribute whenever possible, as it is not accessible. Instead, use the characterCounter
property.
This way the user gets a visual feedback of the number of characters entered and the maximum number of characters allowed. And it will not limit the user in their workflow.
You still can still set the requirement of your desired maximum number of characters by setting the maxLength
property in Eufemia Forms.