Customize Direction

5 Sep 20174 minutes to read

Using this property you can set the drawer to be open from right to left direction or left to right direction. The possible direction values are Right, Left and the default value is Left. Refer to the following code example.

  • HTML
  • <div class="cols-sample-area" style="padding: 0px; position:relative;  margin: 0px; min-height: 451px; width: 100%;">
        <div id="butdrawer" class="drawericon e-icon"></div>
        <ej:NavigationDrawer runat="server" Direction="Right" ID="navpane" Position="Normal"  EnableListView="true" TargetId="butdrawer" >
                            <ListViewSettings Width="300" SelectedItemIndex="0" />
                                <ej:NavigationDrawerItems  Text="Home"  />
                                <ej:NavigationDrawerItems  Text="Profile" />
                                <ej:NavigationDrawerItems  Text="Photos" />
                                <ej:NavigationDrawerItems  Text="Location" />

    Add the following code in style section

  • CSS
  • <style type="text/css">
           .e-header {
                padding-top: 8px;
            #container p {
                padding: 10px;
                text-align: justify;
            #container {
               -moz-user-select: none;
               -webkit-user-select: none;
               -ms-user-select: none;
               user-select: none;
               position: relative;
               overflow: hidden;
               min-height: 451px;
                .e-drawericon {
                background-position: center center;
                background-repeat: no-repeat;
                height: 32px;
                width: 32px;
                background-size: 100% 100%;
                padding-right: 10px;
    			content: "\e76b";
                font-size: 28px;

    The following screenshot displays the output by swiping from right to left at the right side end of the screen.