SlideOut

The SlideOut widget is a classic slide-out menu paired with a view. An end user opens the menu by swiping away the view.

Included in: dx.mobile.js, dx.all.js
Module: ui/slide_out
Export: default

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

jQuery
JavaScript
HTML
CSS
$(function () {
    $("#slideOut").dxSlideOut({
        dataSource: ['SuperLCD 42', 'SuperLED 42', 'SuperLED 50',
                    'SuperLCD 55', 'SuperLCD 70', 'DesktopLCD 19',
                    'DesktopLCD 21', 'DesktopLED 21'],
        onItemClick: function (e) {
            e.component.hideMenu();
        }
    });
});
<div id="slideOut"></div>
#slideOut {
    height: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}
Angular
HTML
TypeScript
<dx-slide-out
    [dataSource]="displays"
    (onItemClick)="closeSlideOut($event)">
</dx-slide-out>
export class AppComponent {
    displays = [
        // ...
    ];
    closeSlideOut = function (e) {
        e.component.hideMenu();
    }
}
AngularJS
HTML
JavaScript
CSS
<div id="slideOut" dx-slide-out="{
    dataSource: displays,
    onItemClick: closeSlideOut
}"></div>
angular.module('DemoApp', ['dx'])
    .controller("DemoController", function ($scope) {
        $scope.displays = [
            'SuperLCD 42', 'SuperLED 42', 'SuperLED 50',
            'SuperLCD 55', 'SuperLCD 70', 'DesktopLCD 19',
            'DesktopLCD 21', 'DesktopLED 21'  
        ];
        $scope.closeSlideOut = function (e) {
            e.component.hideMenu();
        }
    });
#slideOut {
    height: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}
Knockout
HTML
CSS
<div id="slideOut" data-bind="dxSlideOut: {
    dataSource: [
        'SuperLCD 42', 'SuperLED 42', 'SuperLED 50',
        'SuperLCD 55', 'SuperLCD 70', 'DesktopLCD 19',
        'DesktopLCD 21', 'DesktopLED 21'
    ],
    onItemClick: function (e) {
        e.component.hideMenu();
    }
}"></div>
#slideOut {
    height: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}
ASP.NET MVC Controls
Razor C#
Razor VB
@(Html.DevExtreme().SlideOut()
    .ID("slideOut")
    .DataSource(new [] {
        "SuperLCD 42", "SuperLED 42", "SuperLED 50",
        "SuperLCD 55", "SuperLCD 70", "DesktopLCD 19",
        "DesktopLCD 21", "DesktopLED 21"
    })
    .OnItemClick(@<text>
        function (e) {
            e.component.hideMenu();
        }
    </text>)
)
@(Html.DevExtreme().SlideOut() _
    .ID("slideOut") _
    .DataSource({
        "SuperLCD 42", "SuperLED 42", "SuperLED 50",
        "SuperLCD 55", "SuperLCD 70", "DesktopLCD 19",
        "DesktopLCD 21", "DesktopLED 21"
    }) _
    .OnItemClick("slideOut_itemClick")
)
<script>
    function slideOut_itemClick(e) {
        e.component.hideMenu();
    }
</script>

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 SlideOut 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 SlideOut 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