Open In App

Onsen UI CSS Component Toolbar Item

Improve
Improve
Like Article
Like
Save
Share
Report

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:

  • toolbar: This class is used to create the toolbar.
  • toolbar__left: This class is used to create the toolbar item on the left.
  • toolbar__center: This class is used to create the toolbar item on the center.
  • toolbar__right: This class is used to create the toolbar item on the right.

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.

HTML




<!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.

HTML




<!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



Last Updated : 28 Jun, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads