Open In App

Onsen UI CSS Component Bordered Top Tabbar

Onsen UI CSS is used to create beautiful HTML components. It is one of the most efficient ways to create HTML5 hybrid components that are compatible with both mobile and desktop.

Tabbar is used to create the Tabs using Onsen UI classes. Onsen UI CSS Component Bordered Top Tabbar is used to create the bordered tabbar at the top using Onsen UI Tabbar classes.



Onsen UI CSS Component Bordered Top Tabbar Classes:

Syntax:



<div class="tabbar tabbar--top 
            tabbar--top-border">
  <label class="tabbar__item 
           tabbar--top-border__item">
    ...
  </label>
  ...
</div>

Example 1: The following example demonstrates the Onsen UI CSS Component Bordered Top Tabbar.




<!DOCTYPE html>
<html>
  
<head>
    <!-- CDN links of Onsen UI library -->
    <link rel="stylesheet" href=
    <link rel="stylesheet" href=
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h2 style="color: green;">
            GeeksforGeeks
        </h2>
        <strong>
            Onsen UI CSS Component Bordered Top Tabbar
        </strong> <br> <br>
  
        <div class="tabbar tabbar--top 
                    tabbar--top-border">
            <label class="tabbar__item 
                             tabbar--top-border__item">
                <input type="radio" name="tabs" 
                       checked="checked">
                <button class="tabbar__button 
                        tabbar--top-border__button">
                    Item 1
                </button>
            </label>
          
            <label class="tabbar__item 
                          tabbar--top-border__item">
                <input type="radio" name="tabs" 
                       checked="checked">
                <button class="tabbar__button 
                        tabbar--top-border__button">
                    Item 2
                </button>
            </label>
          
            <label class="tabbar__item 
                          tabbar--top-border__item">
                <input type="radio" name="tabs" 
                       checked="checked">
                <button class="tabbar__button 
                        tabbar--top-border__button">
                    Item 3
                </button>
            </label>
          
            <label class="tabbar__item 
                          tabbar--top-border__item">
                <input type="radio" name="tabs" 
                       checked="checked">
                <button class="tabbar__button 
                        tabbar--top-border__button">
                    Item 4
                </button>
            </label>
        </div>
    </center>
</body>
  
</html>

Output:

 

Example 2: The following example demonstrates the Onsen UI CSS Component Bordered Top Tabbar.




<!DOCTYPE html>
<html>
  
<head>
    <!-- CDN links of Onsen UI library -->
    <link rel="stylesheet" href=
    <link rel="stylesheet" href=
    <script src=
    </script>
</head>
  
<body>
    <center>
        <h2 style="color: green;">
            GeeksforGeeks
        </h2>
        <strong>
            Onsen UI CSS Component Bordered Top Tabbar
        </strong> <br> <br>
  
        <div class="tabbar tabbar--top 
                    tabbar--top-border">
            <label class="tabbar__item 
                             tabbar--top-border__item">
                <input type="radio" name="tabs" 
                       checked="checked">
                <button class="tabbar__button 
                        tabbar--top-border__button">
                    <i class="tabbar__icon 
                              ion-ios-menu">
                    </i>
                </button>
            </label>
          
            <label class="tabbar__item 
                             tabbar--top-border__item">
                <input type="radio" name="tabs" 
                       checked="checked">
                <button class="tabbar__button 
                        tabbar--top-border__button">
                    <i class="tabbar__icon 
                              ion-ios-hammer">
                    </i>
                </button>
            </label>
          
            <label class="tabbar__item 
                             tabbar--top-border__item">
                <input type="radio" name="tabs" 
                       checked="checked">
                <button class="tabbar__button 
                        tabbar--top-border__button">
                    <i class="tabbar__icon 
                              ion-ios-star">
                    </i>
                </button>
            </label>
          
            <label class="tabbar__item 
                             tabbar--top-border__item">
                <input type="radio" name="tabs" 
                       checked="checked">
                <button class="tabbar__button 
                        tabbar--top-border__button">
                    <i class="tabbar__icon 
                              ion-ios-calendar">
                    </i>
                </button>
            </label>
        </div>
    </center>
</body>
  
</html>

Output:

 

Reference: https://onsen.io/v2/api/css.html#tabbar-category


Article Tags :