Onsen UI CSS Component Material Toolbar with Icons
Last Updated :
28 Jun, 2022
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 with Icons.
The toolbar is a horizontal bar with some toolbar items and icons. Onsen UI CSS Component Material Toolbar with Icons is used to create the material toolbar with icons using the below classes.
Onsen UI CSS Component Material Toolbar with Icons 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.
- toolbar-button–material: This class is used to create the material toolbar button.
Syntax:
<div class="toolbar toolbar--material">
<div class="toolbar__left
toolbar--material__left">
<span class="toolbar-button
toolbar-button--material">
<i class="..."></i>
</span>
</div>
...
</div>
Example 1: The following example demonstrates the Onsen UI CSS Component Material Toolbar with Icons.
HTML
<!DOCTYPE html>
< html >
< head >
< 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 with Icons
</ strong > < br > < br >
< div class = "toolbar toolbar--material" >
< div class="toolbar__left
toolbar--material__left">
< span class="toolbar-button
toolbar-button--material">
< i class = "ion-ios-star" ></ i >
</ span >
</ div >
< div class="toolbar__center
toolbar--material__center">
Home
</ div >
</ div >
</ center >
</ body >
</ html >
|
Output:
Example 2: The following example demonstrates the Onsen UI CSS Component Material Toolbar with Icons.
HTML
<!DOCTYPE html>
< html >
< head >
< 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 with Icons
</ strong > < br > < br >
< div class = "toolbar toolbar--material" >
< div class="toolbar__left
toolbar--material__left">
< span class="toolbar-button
toolbar-button--material">
< i class = "ion-ios-star" ></ i >
</ span >
</ div >
< div class="toolbar__center
toolbar--material__center">
Home
</ div >
< div class="toolbar__right
toolbar--material__right">
< span class="toolbar-button
toolbar-button--material">
< i class = "zmdi zmdi-more-vert" ></ i >
</ span >
< span class="toolbar-button
toolbar-button--material">
< i class = "zmdi zmdi-search" ></ i >
</ span >
</ div >
</ div >
</ center >
</ body >
</ html >
|
Output:
Reference: https://onsen.io/v2/api/css.html#toolbar-category
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...