Primitives
The textarea primitive can be used to enhance the accessibility of a textarea element and provide consistent interaction handling for hover, focus and press states.
Import the Textarea primitives from ng-primitives/textarea
.
import { NgpTextarea } from 'ng-primitives/textarea';
Assemble the textarea directives in your template.
<textarea ngpTextarea></textarea>
Here are some additional examples of how to use the Textarea primitive.
The textarea automatically integrates with the form field primitives.
The following directives are available to import from the ng-primitives/textarea
package:
[ngpTextarea]
ngpTextarea
The following data attributes are applied to the ngpTextarea
directive:
Attribute | Description | Value |
---|---|---|
data-hover |
The hover state of the input. | true | false |
data-focus |
The focus state of the input. | true | false |
data-disabled |
The disabled state of the input. | true | false |
Copyright © 2024 Angular Primitives