Your search did not match any results.
NavBar

Overview

iOS
Documentation
The NavBar is a widget that navigates the application views.
Copy to Codepen
Apply
Reset
$(function(){ DevExpress.ui.setTemplateEngine("underscore"); var listData = [ { data: new DevExpress.data.DataSource({ store: contacts, sort: "name" }) }, { data: new DevExpress.data.DataSource({ store: contacts, sort: "name", filter: ["category", "=", "Missed"] }) }, { data: new DevExpress.data.DataSource({ store: contacts, sort: "name", filter: ["category", "=", "Favorites"] }) } ]; var list = $("#list").dxList({ dataSource: listData[0].data, itemTemplate: $("#item-template") }).dxList("instance"); $("#navbar").dxNavBar({ dataSource: navData, selectedIndex: 0, onItemClick: function(e) { list.option("dataSource", listData[e.itemIndex].data); } }); });
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src="js/jquery-3.1.0.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/16.2.5/css/dx.spa.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/16.2.5/css/dx.common.css" /> <link rel="dx-theme" data-theme="generic.light" href="https://cdn3.devexpress.com/jslib/16.2.5/css/dx.light.css" /> <link rel="dx-theme" data-theme="android5.light" href="https://cdn3.devexpress.com/jslib/16.2.5/css/dx.android5.light.css" /> <link rel="dx-theme" data-theme="ios7.default" href="https://cdn3.devexpress.com/jslib/16.2.5/css/dx.ios7.default.css" /> <link rel="dx-theme" data-theme="win10.black" href="https://cdn3.devexpress.com/jslib/16.2.5/css/dx.win10.black.css" /> <link rel="dx-theme" data-theme="win10.white" href="https://cdn3.devexpress.com/jslib/16.2.5/css/dx.win10.white.css" /> <script src="https://cdn3.devexpress.com/jslib/16.2.5/js/dx.all.js"></script> <script src="js/underscore-1.5.1.min.js"></script> <script src="data.js"></script> <link rel="stylesheet" type ="text/css" href ="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="list"></div> <div id="navbar"></div> <script type="text/html" id="item-template"> <div class="image-container"> <img src="<%= image %>"> </div> <div class="info"> <div><%= name %></div> <div><%= phone %></div> <div><%= email %></div> </div> </div> </script> </div> </body> </html>
.dx-list { height: 90%; position: absolute; top: 0; bottom: 0; } .info { margin-top: 5px; height: 78px; } .image-container { width: 65px; float: left; margin-right: 20px; } .image-container img { display: block; width: 100%; } .dx-tabs.dx-navbar { text-align: center; position: absolute; bottom: 0; }
var contacts = [ { name: "Barbara J. Coggins", phone: "512-964-2757", image: "../../../../images/employees/04.png", email: "BarbaraJCoggins@rhyta.com", category: "Favorites" }, { name: "Leslie S. Alcantara", phone: "360-684-1334", image: "../../../../images/employees/01.png", email: "LeslieSAlcantara@teleworm.us", category: "Missed" }, { name: "Chad S. Miles", phone: "520-573-7903", image: "../../../../images/employees/02.png", email: "ChadSMiles@rhyta.com", category: "Favorites" }, { name: "Michael A. Blevins", phone: "530-480-1961", image: "../../../../images/employees/03.png", email: "MichaelABlevins@armyspy.com", category: "Missed" }, { name: "Jane K. Hernandez", phone: "404-781-0805", image: "../../../../images/employees/05.png", email: "JaneKHernandez@teleworm.us", category: "Favorites" }, { name: "Kim D. Thomas", phone: "603-583-9043", image: "../../../../images/employees/06.png", email: "KimDThomas@teleworm.us", category: "Outgoing call" }, { name: "Donald L. Jordan", phone: "772-766-2842", image: "../../../../images/employees/07.png", email: "DonaldLJordan@dayrep.com", category: "Favorites" }, { name: "Nicole A. Rios", phone: "213-812-8400", image: "../../../../images/employees/09.png", email: "NicoleARios@armyspy.com", category: "Missed" }, { name: "Barbara M. Roberts", phone: "614-365-7945", image: "../../../../images/employees/08.png", email: "BarbaraMRoberts@armyspy.com", category: "Outgoing call" } ]; var navData = [{ text: "Contacts", icon: "user" }, { text: "Missed", icon: "clock", badge: 3 }, { text: "Favorites", icon: "favorites" } ];