![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
ngx-draggable-dom
Advanced tools
Angular attribute directive that causes any element to become a draggable element.
Angular attribute directive that causes any element to become a draggable element.
This package provides a directive for Angular that makes any DOM element draggable. This project began as a fork of the angular2-draggable directive by xieziyu and was created to provide a more robust set of features and to keep package releases on the bleeding edge. The initial fork was known as ng2-draggable-dom and was deprecated in favor of this package that runs using the latest Angular dependencies and tools for libraries.
npm install ngx-draggable-dom --save
Import NgxDraggableDomModule
in your app module (or other Angular module) and place it in your imports section:
import { NgxDraggableDomModule } from "ngx-draggable-dom";
@NgModule({
imports: [
...,
NgxDraggableDomModule,
],
...
})
export class AppModule { }
Use the ngxDraggableDom
directive to make a DOM element draggable.
<div ngxDraggableDom="true">Drag me!</div>
Import ngx-draggable-dom.scss
to your application's styles or add it to your angular.json
if you use the CLI tools.
Explore the API of inputs and outputs to help make your element drag just the way you would like, or run the wrapper project to test it out with some pre-designed examples!
ngxDraggableDom
{boolean}
true
: The element can be dragged.false
: The element cannot be dragged.handle
{HTMLElement}
bounds
{HTMLElement}
constrainByBounds
{boolean}
true
: If bounds
is set, the draggable element will be constrained by that HTMLElement.false
(default): If bounds
is set, the draggable element will just report which boundary edge has been passed by in the edge
output emitter.requireMouseOver
{boolean}
true
: The draggable element will be put back down as soon as the mouse leaves the HTMLElement.false
(default): The draggable element will always follow the mouse position as long as the mouse is held down.requireMouseOverBounds
{boolean}
true
: The draggable element will not move when it is constrained by a bounds edge and the mouse position is outside of the bounds.false
: The draggable element can still move in an unconstrained direction while it is being constrained in another and the mouse position is outside of the bounds.ignoreMultiTouchEvents
{boolean}
true
: The object will not move for multi touch gestures, allowing you to support a single touch for movement and multi-touch for other functionality at the same time.false
: The object will move for any type of touch event that interacts with it, whether a single touch or multi-touch gesture.started
{NgxDraggableDomMoveEvent}
stopped
{NgxDraggableDomMoveEvent}
moved
{NgxDraggableDomMoveEvent}
edge
{NgxDraggableDomBoundsCheckEvent}
bounds
is set, this event will be fired defining the state of the interaction between the element and the bounds constraints. This event will be fired for every movement that collides with the bounds when constraining and when the end user stops dragging.target
{HTMLElement}
position
{NgxDraggablePoint}
top
{boolean}
true
.right
{boolean}
true
.bottom
{boolean}
true
.left
{boolean}
true
.constrainedCenter
{NgxDraggablePoint}
translation
{NgxDraggablePoint}
isConstrained
{boolean}
true
.reset()
{void}
When ngxDraggableDom
is enabled on some element, the ngx-draggable
class is automatically assigned to it. When the user is actively dragging the element, the class ngx-dragging
is applied to the element (or the specified handle). If you include the provided ngx-draggable-dom.scss
styles into your project from node_modules/ngx-draggable-dom/styles/ngx-draggable-dom.scss
, you will receive native styling and support for turning off CSS transitions while interacting with the element. You can override these to customize the look and feel for when you are interacting with the element. For example, change the cursor style for draggable elements in your page by doing the following:
.ngx-draggable {
cursor: move;
}
.ngx-dragging {
cursor: grabbing !important;
}
FAQs
Angular attribute directive that causes any element to become a draggable element.
The npm package ngx-draggable-dom receives a total of 0 weekly downloads. As such, ngx-draggable-dom popularity was classified as not popular.
We found that ngx-draggable-dom demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.