Onsen UI CSS Component Material Tabbar (Icon and Label)
Onsen UI CSS is used to create beautiful HTML components. It is one of the most efficient ways to create HTML5 hybrid components compatible with mobile and desktop.
Onsen UI CSS Components are pre-built CSS components that may be used to create adaptive and attractive user interface layouts rapidly. Onsen UI CSS Component Material Tabbar (Icon and Label) is used to create the material tabbar with icons and labels using the below classes.
Onsen UI CSS Component Material Tabbar (Icon and Label) Classes:
- tabbar–material__icon: This class is used to create the material tabbar with an icon.
- tabbar–material__label: This class is used to create the material tabbar with the label.
Syntax:
<div class="tabbar tabbar--top tabbar--material"> <label class="tabbar__item tabbar--material__item"> ... <i class="tabbar__icon tabbar--material__icon ..."> </i> <div class="tabbar__label tabbar--material__label"> ... </div> </label> ... </div>
Example 1: The following example demonstrates the Onsen UI CSS Component Material Tabbar (Icon and Label).
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 Tabbar (Icon and Label) </ strong > < br > < br > < div class="tabbar tabbar--top tabbar--material"> < label class="tabbar__item tabbar--material__item"> < input type = "radio" name = "tabs" checked = "checked" > < button class="tabbar__button tabbar--material__button"> < i class="tabbar__icon tabbar--material__icon ion-ios-menu"> </ i > < div class="tabbar__label tabbar--material__label"> Menu </ div > </ button > </ label > < label class="tabbar__item tabbar--material__item"> < input type = "radio" name = "tabs" checked = "checked" > < button class="tabbar__button tabbar--material__button"> < i class="tabbar__icon tabbar--material__icon zmdi zmdi-delete"> </ i > < div class="tabbar__label tabbar--material__label"> Delete </ div > </ button > </ label > </ div > </ center > </ body > </ html > |
Output:

Example 2: The following example demonstrates the Onsen UI CSS Component Material Tabbar (Icon and Label).
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 Tabbar (Icon and Label) </ strong > < br > < br > < div class="tabbar tabbar--top tabbar--material"> < label class="tabbar__item tabbar--material__item"> < input type = "radio" name = "tabs" checked = "checked" > < button class="tabbar__button tabbar--material__button"> < i class="tabbar__icon tabbar--material__icon ion-ios-menu"> </ i > < div class="tabbar__label tabbar--material__label"> Menu </ div > </ button > </ label > < label class="tabbar__item tabbar--material__item"> < input type = "radio" name = "tabs" checked = "checked" > < button class="tabbar__button tabbar--material__button"> < i class="tabbar__icon tabbar--material__icon fa fa-bell"> </ i > < div class="tabbar__label tabbar--material__label"> Subscribe </ div > </ button > </ label > < label class="tabbar__item tabbar--material__item"> < input type = "radio" name = "tabs" checked = "checked" > < button class="tabbar__button tabbar--material__button"> < i class="tabbar__icon tabbar--material__icon zmdi zmdi-delete"> </ i > < div class="tabbar__label tabbar--material__label"> Delete </ div > </ button > </ label > < label class="tabbar__item tabbar--material__item"> < input type = "radio" name = "tabs" checked = "checked" > < button class="tabbar__button tabbar--material__button"> < i class="tabbar__icon tabbar--material__icon zmdi zmdi-phone"> </ i > < div class="tabbar__label tabbar--material__label"> Phone </ div > </ button > </ label > < label class="tabbar__item tabbar--material__item"> < input type = "radio" name = "tabs" checked = "checked" > < button class="tabbar__button tabbar--material__button"> < i class="tabbar__icon tabbar--material__icon zmdi zmdi-pin-account"> </ i > < div class="tabbar__label tabbar--material__label"> Profile </ div > </ button > </ label > </ div > </ center > </ body > </ html > |
Output:

Reference: https://onsen.io/v2/api/css.html#tabbar-category
Please Login to comment...