Gallery

The dxGallery is a widget that displays a collection of images in a carousel. The widget is supplied with various navigation controls that allow a user to switch between images.

Included in: dx.phonejs.js, dx.webappjs.js, dx.all.js
Gallery interactive configuration
Copy Code
Copy to Codepen
$("#gallery").dxGallery({
});

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

  • jQuery
    Use the dxGallery jQuery plug-in.

    HTML
    <div id="gallery"></div>
    JavaScript
    $("#gallery").dxGallery({
        dataSource: galleryData,
        showIndicator: true,
        indicatorEnabled: true,
        showNavButtons: true
    });
  • Knockout
    Add a div element and apply the dxGallery binding to this element.

    HTML
    <div data-bind="dxGallery: {
        dataSource: galleryData,
        showIndicator: true,
        indicatorEnabled: true,
        showNavButtons: true
    }"></div>
  • AngularJS
    Add a div element and apply the dx-gallery directive to this element.

    HTML
    <div dx-gallery="{
        dataSource: galleryData,
        showIndicator: true,
        indicatorEnabled: true,
        showNavButtons: true
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries 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 Installation article.

The dxGallery widget supports common Collection Container functionality. You can find detailed information on the principles of working with collection container widgets in the Collection Container Widgets guide. For detailed information on working with the dxGallery widget, refer to the dxGallery guide.

View Demo

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the dxGallery widget.

Methods

This section describes members used to manipulate the widget.

Events

This section describes events fired by this widget.

Default Item Template

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

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