Interactions

Move

The Move primitives enable pointer and keyboard move interactions on an element.

Import

Import the Move primitives from ng-primitives/interactions.

import { NgpMove } from 'ng-primitives/interactions';

Usage

Assemble the move directives in your template.

<div (ngpMove)="onMove($event)"></div>

API Reference

The following directives are available to import from the ng-primitives/interactions package:

NgpMove

The NgpMove directive is used to enable the pointer and keyboard move interactions on an element.

  • Selector: [ngpMove]
  • Exported As: ngpMove
Disables the move interaction. Emits when the move interaction starts. Emits when the move interaction is in progress. Emits when the move interaction ends.

Data Attributes

The following data attributes are available to use with the NgpMove directive:

Attribute Description Value
data-move Whether the element is moving. true | false

Copyright © 2024 Angular Primitives