Open In App

Onsen UI CSS Component Transparent Toolbar

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

The toolbar is a horizontal bar with some toolbar items and icons. The Transparent Toolbar is used to create the transparent toolbar with some items using the toolbar–transparent class.

Onsen UI CSS Component Transparent Toolbar Class:

  • toolbar–transparent: This class is used to create the transparent toolbar.
  • toolbar__left: This class is used to align the toolbar to the left side.
  • toolbar__center: This class is used to align the toolbar to the center.
  • toolbar__right: This class is used to align the toolbar to the right side.
  • toolbar-button: This class is used to add the button to the toolbar.

Syntax:

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

Example 1: The following example demonstrates the Onsen UI CSS Component Transparent 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>
        <h1 style="color: green;">
            GeeksforGeeks
        </h1>
        <h3>
            Onsen UI CSS Component Transparent Toolbar
        </h3>
  
        <div class="toolbar toolbar--transparent">
            <div class="toolbar__center">
                Home
            </div>
            <div class="toolbar__right">
                About Us
            </div>
        </div>
    </center>
</body>
</html>


Output:

 

Example 2: The following example demonstrates the Onsen UI CSS Component Transparent 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>
        <h1 style="color: green;">
            GeeksforGeeks
        </h1>
        <h3>
            Onsen UI CSS Component Transparent Toolbar
        </h3>
        <div class="toolbar toolbar--transparent">
            <div class="toolbar__left">
                <span class="toolbar-button">
                    <i class="ion-ios-menu"></i>
                </span>
            </div>
            <div class="toolbar__center">
                Home
            </div>
            <div class="toolbar__right">
                <span class="toolbar-button">
                    Login
                </span>
                <span class="toolbar-button">
                    Logout
                </span>
            </div>
        </div>
    </center>
</body>
</html>


Output:

 

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



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