Interactions
Normalizes the focus event across different browsers and devices.
Import the Focus primitives from ng-primitives/interactions
.
import { NgpFocus } from 'ng-primitives/interactions';
Assemble the focus directives in your template.
<div (ngpFocus)="onFocusChange($event)"></div>
The following directives are available to import from the ng-primitives/interactions
package:
[ngpFocus]
ngpFocus
Whether listening for focus events is disabled.
Event emitted when the focus state changes.
The following data attributes are applied to the ngpFocus
directive:
Attribute | Description |
---|---|
data-focus |
Applied when the element is focused. |
Copyright © 2025 Angular Primitives