Popup

The Popup widget is a pop-up window overlaying the current view.

Included in: dx.mobile.js, dx.web.js, dx.viz-web.js, dx.all.js
Module: ui/popup
Export: default
Popup interactive configuration
Copy Code
Copy to Codepen
$("#popup").dxPopup({
});

You can create the widget using one of the following approaches.

  • jQuery

    HTML
    JavaScript
    <div id="popup">
        <p>Popup content</p>
    </div>
    $(function () {
        $("#popup").dxPopup({
            title: 'Popup Title',
            visible: true
        });
    });
  • Angular

    HTML
    JavaScript
    <dx-popup
        title="Popup Title"
        [(visible)]="isPopupVisible">
            <p>Popup content</p>
    </dx-popup>
    export class AppComponent {
        isPopupVisible = true;
    }
  • AngularJS

    HTML
    JavaScript
    <div ng-controller="DemoController">
        <div dx-popup="{
            title: 'Popup Title',
            bindingOptions: {
                visible: 'isPopupVisible'
            }
        }">
            <p>Popup content</p>
        </div>
    </div>
    angular.module('DemoApp', ['dx'])
        .controller('DemoController', function DemoController($scope) {
            $scope.isPopupVisible = true;
        });
  • Knockout

    HTML
    JavaScript
    <div data-bind="dxPopup: {
        title: 'Popup Title',
        visible: isPopupVisible
    }"></div>
    var viewModel = {
        isPopupVisible: ko.observable(true)
    };
    ko.applyBindings(viewModel);
  • ASP.NET MVC Wrappers

    Razor C#
    Razor VB
    @(Html.DevExtreme().Popup()
        .ID("popover")
        .Title("Popup Title")
        .Visible(true)
        .ContentTemplate(@<text>
            <p>Popup content</p>
        </text>)
    )
    @Code
        Html.DevExtreme().Popup() _
            .ID("popover") _
            .Title("Popup Title") _
            .Visible(True) _
            .ContentTemplate(Sub()
                @<text>
                    <p>Popup content</p>
                </text>
            End Sub).Render()
    End Code

Note that DevExtreme widgets require you to link the jQuery library to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the topics in the Installation section.

View Demo

See Also
Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the Popup widget.

Methods

This section describes methods used to manipulate the widget.

Events

This section describes events fired by this widget.