How to make the modal can be dragged.

Please remember, the issues forum is NOT for support requests. It is for bugs and feature requests only.
Please read and search
existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.

Bug description:

Link to minimally-working plunker that reproduces the issue:

You can fork a plunker from one of our demos and use it as a starting point.
Please note that we can not act on bug reports without a minimal reproduction scenario in plunker. Here is why:

Version of Angular, ng-bootstrap, and Bootstrap:




i want to know …thanks

2 thoughts on “How to make the modal can be dragged.

  1. @pkozlowski-opensource is this a feature we could consider supporting by allowing users to hook in custom directives? The way we use the component ref seems to suggest this would be an impossible feature for a user to use with our modals. This is mainly due to the fact that the NgbModalWindow is a component with a template, and cannot be extended.

    In order to support something like this, we would need to allow users to provide their own custom implementation of a component that works like NgbModalWindow. Is this worth considering adding support for in the library? This doesn’t sound unreasonable to me, although it’s a non-trivial amount of work.

  2. Is there any way to make modals draggable with @angular/cdk? To achieve this I should add cdkDrag inside element with class='modal-content' but I have no clue how to do this when I call NgbModal service:
    const modalRef =;
    NgbModalOptions provides functionality to add class only but not attribute directive.