Open In App

Onsen UI CSS Component Toolbar Item

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. In this article, we will see the Onsen UI CSS Component Toolbar Item.

The toolbar is a horizontal bar with some toolbar items and icons. Onsen UI CSS Component Toolbar Item is used to create the toolbar with some toolbar items using the below classes.



Onsen UI CSS Component Toolbar Item Classes:

Syntax:



<div class="toolbar">
  <div class="toolbar__left">
    ...
  </div>
  <div class="toolbar__center">
   ...
  </div>
  <div class="toolbar__right">
    ....
  </div>
</div>

Example 1: The following example demonstrates the Onsen UI CSS Component Toolbar Item.




<!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 Toolbar Item
        </strong> <br> <br>
  
        <div class="toolbar">
            <div class="toolbar__center">
                Home
            </div>
              
            <div class="toolbar__right">
                <span class="toolbar-button">
                    Logout
                </span>
            </div>
        </div>
    </center>
</body>
  
</html>

Output:

 

Example 2: The following example demonstrates the Onsen UI CSS Component Toolbar Item.




<!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 Toolbar Item
        </strong> <br> <br>
  
        <div class="toolbar">
            <div class="toolbar__left">
                <span class="toolbar-button">
                    <i class="ion-ios-star"></i>
                </span>
            </div>
            <div class="toolbar__center">
                Home
            </div>
            <div class="toolbar__right">
                <span class="toolbar-button">
                    Logout
                </span>
            </div>
        </div>
    </center>
</body>
  
</html>

Output:

 

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


Article Tags :