Interactions
Determine whether focus should be visible based on user interaction.
Import the Focus Visible primitives from ng-primitives/interactions
.
import { NgpFocusVisible } from 'ng-primitives/interactions';
Assemble the focus-visible directives in your template.
<div (ngpFocusVisible)="onFocusVisible($event)"></div>
The following directives are available to import from the ng-primitives/interactions
package:
[ngpFocusVisible]
ngpFocusVisible
The following data attributes are applied to the ngpFocusVisible
directive:
Attribute | Description |
---|---|
data-focus-visible |
Applied when the element is focused. |
Copyright © 2024 Angular Primitives