-
Notifications
You must be signed in to change notification settings - Fork 0
Textarea
Nariman Bortov edited this page Jul 2, 2023
·
3 revisions
import { Textarea } from '@narimanb/wreactui'
The default base textarea
doesn't need any special prop, but all attributes that you would usually use in normal HTML are available here too. Note that if you're not using a Label
component (not recommended), you should use an aria-label
attribute to give screen readers a label.
Code
<Label>
<span>Message</span>
<Textarea className="mt-1" rows="3" placeholder="Enter some long form content." />
</Label>
The disabled
prop applies disabled styles to the textarea
.
Code
<Textarea disabled rows="3" placeholder="Enter some long form content." />
The valid
prop applies valid styles to the textarea
.
Code
<Textarea valid rows="3" placeholder="Enter some long form content." />
Give a value of false
to the valid
prop to apply invalid styles to the textarea
.
Code
<Textarea valid={false} rows="3" placeholder="Enter some long form content." />
Prop | Description | Type | Default |
---|---|---|---|
disabled |
apply disabled styles to the textarea
|
boolean |
|
valid |
apply valid or invalid styles to the textarea
|
boolean |
Original source: Estevan Maito https://windmillui.com/react-ui