Tags & Pills

Vertical navigation with tags & pills

Small and adaptive tag for adding context to just about any content.

Description

Easily highlight new or unread items by adding tags & pills to links, Bootstrap navs, and more. Vertical Navigation menu items can contain tags and pills in all navigation levels. You can use any color tags and pills with flat or glow effect. Robust Admin vertical navigation has tag & pills on left side.

Experience it!

This page contain navigation menu with tags & pills example, check at the left hand side of the page.

Examples

Tags example

Default Primary Success Info Warning Danger

Tags with .tag-pill example

Default Primary Success Info Warning Danger

Tags with .tag-glow & custom background and border color.

Info Warning Danger teal blue grey purple

Tags (as pills)

12 5 8 12 10 15

Tags (as pills) with icons

Tags (as pills) with .tag-glow & custom background and border color.

12 50 2 9 11 100

CSS Classes

Tags

This table contains all classes related to the vertical navigation with tags option. Tags scale to match the size of the immediate parent element by using relative font sizing and em units.

All these options can be set via following classes:

Classes Description
.tag This is tags basic class must have to add for creating tags.
.tag-pill Use the .tag-pill modifier class to make tags more rounded (with a larger border-radius and additional vertical padding).
.tag-default tag-default
.tag-default tag-primary
.tag-default tag-success
.tag-default tag-info
.tag-default tag-warning
.tag-default tag-danger
Add any of the mentioned modifier classes to change the appearance of a tag.
.tag-glow Add this class to add glow effect to tags or pills. This is optional class.
.bg-[color]

To set the dark navbar background color use .bg-[color] class where [color] is the value of your selected color from robust color palette. So for green color background class will be .bg-green. Refer HTML markup line no 2. Background color class is a optional if you don't it will take white background default.

.bg-darken-[*]

To set the selected background color darken use .bg-darken-[*] class where [*] is the value between '1-5' of your selected darken color from robust color palette. So for color darken 4 background class will be .bg-darken-4. Refer HTML markup line no 2. Background darken color class is a optional if you don't it will take white background default.

.bg-darken-[*] class will work only if you have used .bg-[color].

.border-[color]

To set the dark navbar border color use .border-[color] class where [color] is the value of your selected color from robust color palette. So for green color border class will be .bg-green. Refer HTML markup line no 2. Border color class is a optional.

.border-darken-[color]

To set the selected border color darken use .border-darken-[*] class where [*] is the value between '1-5' of your selected darken color from robust color palette. So for color darken 4 border class will be .border-darken-4. Refer HTML markup line no 2. Border darken color class is a optional.

.border-darken-[*] class will work only if you have used .border-[color].

HTML Markup

This section contains HTML Markup to add tags & pills to vertical navigation menu with options.

  • Line no 21, 27 & 35: Contain the <span class="tag tag-default tag-info float-xs-right">1.2.2</span> html code to add tag or badge to the menu items.
          
            <!DOCTYPE html>
            <html lang="en">
            <head></head>
            <body data-open="click" data-menu="vertical-menu" class="vertical-layout vertical-menu 1-column menu-expanded">

              <!-- navbar-static-top-->
              <nav role="navigation" class="header-navbar navbar navbar-with-menu navbar-static-top navbar-dark navbar-shadow navbar-border">
              ...
              </nav>

              <!-- START main menu-->
                <div id="main-menu" data-scroll-to-active="true" class="main-menu menu-dark menu-fixed menu-shadow">
                    <!-- main menu header-->
                    <div class="main-menu-header">
                        <input type="text" placeholder="Search" class="menu-search form-control round" />
                    </div>
                    <!-- / main menu header-->
                    <!-- main menu content-->
                    <div class="main-menu-content menu-accordion">
                        <ul id="main-menu-navigation" data-menu="menu-navigation" class="navigation navigation-main">
                            <li class=" nav-item"><a href="index.html"><i class="icon-home3"></i><span data-i18n="nav.dash.main" class="menu-title">Dashboard <span class="tag tag-info float-xs-right">5</span></span></a>
                                <ul class="menu-content">
                                    <li><a href="dashboard-project.html" data-i18n="nav.dash.project" class="menu-item">Project</a>
                                    </li>
                                    <li><a href="dashboard-ecommerce.html" data-i18n="nav.dash.ecommerce" class="menu-item">eCommerce</a>
                                    </li>
                                    <li><a href="dashboard-analytics.html" data-i18n="nav.dash.analytics" class="menu-item">Analytics <span class="tag tag-glow tag-danger float-xs-right">New</span></a>
                                    </li>
                                    <li><a href="dashboard-crm.html" data-i18n="nav.dash.crm" class="menu-item">CRM</a>
                                    </li>
                                    <li><a href="dashboard-fitness.html" data-i18n="nav.dash.fitness" class="menu-item">Fitness</a>
                                    </li>
                                </ul>
                            </li>
                            <li class=" nav-item"><a href="#"><i class="icon-note"></i><span data-i18n="nav.templates.main" class="menu-title">Templates <span class="tag tag-success float-xs-right">7</span></span></a>
                                <ul class="menu-content">
                                    <li><a href="#" data-i18n="nav.templates.vert.main" class="menu-item">Vertical</a>
                                        <ul class="menu-content">
                                            <li><a href="#" data-i18n="nav.templates.vert.classic_menu" class="menu-item">Classic Menu</a>
                                            </li>
                                            <li><a href="#" data-i18n="nav.templates.vert.compact_menu" class="menu-item">Compact Menu</a>
                                            </li>
                                            <li><a href="#" data-i18n="nav.templates.vert.content_menu" class="menu-item">Content Menu</a>
                                            </li>
                                            <li><a href="#" data-i18n="nav.templates.vert.overlay_menu" class="menu-item">Overlay Menu</a>
                                            </li>
                                            <li><a href="#" data-i18n="nav.templates.vert.multi_level_menu" class="menu-item">Multi-level Menu</a>
                                            </li>
                                        </ul>
                                    </li>
                                    <li><a href="#" data-i18n="nav.templates.horz.main" class="menu-item">Horizontal</a>
                                        <ul class="menu-content">
                                            <li><a href="#" data-i18n="nav.templates.horz.classic" class="menu-item">Classic</a>
                                            </li>
                                            <li><a href="#" data-i18n="nav.templates.horz.top_icon" class="menu-item">Top Icon</a>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                </div>
                <!-- END main menu-->


              <!-- BEGIN Content-->
              <div class="content robust-content container-fluid">
              <div class="content-wrapper">
              <!-- content header-->
              <div class="content-header row">
              ...
              </div>
              <!-- content header-->

              <!-- content body-->
              <div class="content-body">
              ...
              </div>
              <!-- content body-->

              </div>
              </div>
              <!-- END Content-->

              <!-- START FOOTER DARK-->
              <footer class="footer footer-dark">
              ...
              </footer>
              <!-- START FOOTER DARK-->

            </body>
            </html>
          
          

JADE Configuration

Robust Admin use JADE as template engine to generate pages and whole template quickly using node js, for getting start with JADE usage & template generating process please refer template documentation.

Menu JSON Configurations
Options Description
tag Add the tag or Badge any text or icon you want to display.
tagcustom Configure your tag classes as per your requirements, you can use any classes combination from above CSS Classes table. i.e "tag tag-glow tag-pill tag-default tag-danger"
JADE Code

You need to add tags and pills options to menu JSON object, please read the documentation to customize the menu using JADE.

  • Line no 16, 20 & 27: Contain menu tags and pills JSON configurations options.

Robust Admin use the common menu JSON object to generate same menu on each pages of your template that will save your time by reducing the repetitive menu customization task on each page. This template has menu example jade file for every layouts, Here in below example, it shows vertical menu layout menu JADE file vertical-menu.jade, you can use it on template level only it will generate whole template with the same menu options.

                
                    +verticalMenu([

                      //- Dashbaord
                      {url:"index.html",name:"Dashboard",slug:"dashboard",icon:"icon-home3", tag="5", tagcustom="tag tag-info float-xs-right" , i18n:"nav.dash.main",
                        submenu:[
                          {url:"dashboard-project.html", name:"Project", slug:"dashboard-project", i18n:"nav.dash.project"},
                          {url:"dashboard-ecommerce.html", name:"eCommerce", slug:"dashboard-ecommerce", i18n:"nav.dash.ecommerce"},
                          {url:"dashboard-analytics.html", name:"Analytics", slug:"dashboard-analytics", tag="new", tagcustom="tag tag-glow tag-danger", i18n:"nav.dash.analytics"},
                          {url:"dashboard-crm.html", name:"CRM", slug:"dashboard-crm", i18n:"nav.dash.crm"},
                          {url:"dashboard-fitness.html", name:"Fitness", slug:"dashboard-fitness", i18n:"nav.dash.fitness"},
                        ]
                      },

                      //- Templates
                      {url:"#",name:"Templates",slug:"#",icon:"icon-note", tag="7", tagcustom="tag tag-success float-xs-center" , i18n:"nav.templates.main",
                        submenu:[
                          {url:"#", name:"Vertical", slug:"", i18n:"nav.templates.vert.main",
                            submenu:[
                              {url:"#", name:"Classic Menu", slug:"", i18n:"nav.templates.vert.classic_menu"},
                              {url:"#", name:"Compact Menu", slug:"", i18n:"nav.templates.vert.compact_menu"},
                              {url:"#", name:"Content Menu", slug:"", i18n:"nav.templates.vert.content_menu"},
                              {url:"#", name:"Overlay Menu", slug:"", i18n:"nav.templates.vert.overlay_menu"},
                              {url:"#", name:"Multi-level Menu", slug:"", i18n:"nav.templates.vert.multi_level_menu"},
                            ]
                          },
                          {url:"#", name:"Horizontal", slug:"", i18n:"nav.templates.horz.main",
                            submenu:[
                              {url:"#", name:"Classic", slug:"", i18n:"nav.templates.horz.classic"},
                              {url:"#", name:"Top Icon", slug:"", i18n:"nav.templates.horz.top_icon"},
                            ]
                          },
                        ]
                      },
                    ]);