Skip to content
Related Articles
Open in App
Not now

Related Articles

Onsen UI CSS Component Material Toolbar

Improve Article
Save Article
Like Article
  • Last Updated : 28 Jun, 2022
Improve Article
Save Article
Like Article

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 Material Toolbar.

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

Onsen UI CSS Component Material Toolbar Classes:

  • toolbar–material: This class is used to create the material toolbar.
  • toolbar–material__center: This class is used to create the material toolbar in the center.
  • toolbar–material__left: This class is used to create the material toolbar on the left.
  • toolbar–material__right: This class is used to create the material toolbar on the right.

Syntax:

<div class="toolbar toolbar--material">
  ...
</div>

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

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 Material Toolbar
        </strong> <br> <br>
  
        <div class="toolbar toolbar--material">
            <div class="toolbar__center 
                        toolbar--material__center">
                GeeksforGeeks
            </div>
        </div>
    </center>
</body>
  
</html>


Output:

 

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

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 Material Toolbar
        </strong> <br> <br>
  
        <div class="toolbar toolbar--material">
            <div class="toolbar__left 
                        toolbar--material__left">
                Menu
            </div>
            <div class="toolbar__center 
                        toolbar--material__center">
                Home
            </div>
            <div class="toolbar__right 
                        toolbar--material__right">
                Logout
            </div>
        </div>
    </center>
</body>
  
</html>


Output:

 

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


My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!