Panorama

The Panorama widget is a full-screen widget that allows you to arrange items on a long horizontal canvas split into several views. Each view contains several items, and an end user navigates the views with the swipe gesture. The Panorama is often used as a navigation map on the first page of an application.

Included in: dx.mobile.js, dx.all.js
Module: ui/panorama
Export: default
Panorama interactive configuration
Copy Code
Copy to Codepen
$("#panorama").dxPanorama({
});

DevExtreme widgets are integrated with many popular libraries and frameworks. See the Installation section (for JavaScript libraries) or the Prerequisites and Installation section (for ASP.NET MVC framework) to find details on setting up DevExtreme with a particular library or framework.

The following code shows how to create the Panorama widget using every supported library and framework. For more details on working with widgets in these libraries and frameworks, see the Widget Basics topic for jQuery, Angular, AngularJS, Knockout or ASP.NET MVC.

jQuery
JavaScript
HTML
CSS
$(function () {
    $("#panorama").dxPanorama({
        items: [{
            title: "Item 1 Title",
            text: "Item 1 Text Content"
        }, {
            title: "Item 2 Title",
            text: "Item 2 Text Content"
        }],
        backgroundImage: {
            url: '/here/goes/your/image.png',
            height: 600,
            width: 800
        }
    });
});
<div id="panorama"></div>
#panorama {
    height: auto;
    position: absolute;
    top: 0; 
    bottom: 0;
    width: 100%;
}
Angular
HTML
TypeScript
<dx-panorama
    [items]="panoramaItems">
    <dxo-background-image
        url="/here/goes/your/image.png"
        [height]="600"
        [width]="800">
    </dxo-background-image>
</dx-panorama>
import { DxPanoramaModule } from 'devextreme-angular';
// ...
export class AppComponent {
    panoramaItems = [{
        title: "Item 1 Title",
        text: "Item 1 Text Content"
    }, {
        title: "Item 2 Title",
        text: "Item 2 Text Content"
    }];
}
@NgModule({
    imports: [
        // ...
        DxPanoramaModule
    ],
    // ...
})
AngularJS
HTML
JavaScript
CSS
<div ng-controller="DemoController">
    <div id="panorama" dx-panorama="{
        items: panoramaItems,
        backgroundImage: {
            url: '/here/goes/your/image.png',
            height: 600,
            width: 800
        }
    }"></div>
</div>
angular.module('DemoApp', ['dx'])
    .controller("DemoController", function ($scope) {
        $scope.panoramaItems = [{
            title: "Item 1 Title",
            text: "Item 1 Text Content"
        }, {
            title: "Item 2 Title",
            text: "Item 2 Text Content"
        }];
    });
#panorama {
    height: auto;
    position: absolute;
    top: 0; 
    bottom: 0;
    width: 100%;
}
Knockout
HTML
JavaScript
CSS
<div id="panorama" data-bind="dxPanorama: {
    items: panoramaItems,
    backgroundImage: {
        url: '/here/goes/your/image.png',
        height: 600,
        width: 800
    }
}"></div>
var viewModel = {
    panoramaItems: [{
        title: "Item 1 Title",
        text: "Item 1 Text Content"
    }, {
        title: "Item 2 Title",
        text: "Item 2 Text Content"
    }]
};
ko.applyBindings(viewModel);
#panorama {
    height: auto;
    position: absolute;
    top: 0; 
    bottom: 0;
    width: 100%;
}

View Demo Watch Video

See Also
Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the Panorama widget.

Methods

This section describes members used to manipulate the widget.

Events

This section describes events fired by this widget.

See Also

Default Item Template

This section lists the data source fields that are used in a default template for panorama items.

Type:

Object

By default, a predefined item template is applied to display the items of this widget. This template is based on certain fields of the data source provided for this widget. Below is the list of these fields. If the default item template is not appropriate for your task, implement a custom item template based on these or other fields of your data source.

See Also