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.
Lists are used to store data or information on web pages in ordered or unordered form. Onsen UI CSS Component Material List with Header is used to create the material list with the header using list-header–material class.
Onsen UI CSS Component Material List with Header Class:
- list-header–material: This class is used to create the material list header.
Syntax:
<ul class="list list--material"> <li class="list-header list-header--material"> ... </li> ... </ul>
Example 1: The following example demonstrates the Onsen UI CSS Component Material List with Header.
<!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
Material List with Header
</ h3 >
< ul class = "list list--material" >
< li class="list-header
list-header--material">
This is Material Header
</ li >
< li class = "list-item list-item--material" >
< div class="list-item__center
list-item--material__center">
< div class="list-item__title
list-item--material__title">
GeeksforGeeks
</ div >
</ div >
</ li >
</ ul >
</ center >
</ body >
</ html >
|
Output:
Example 2: The following example demonstrates the Onsen UI CSS Component Material List with Header.
<!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
Material List with Header
</ h3 >
< ul class = "list list--material" >
< li class="list-header
list-header--material">
Material List Header
</ li >
< li class = "list-item list-item--material" >
< div class="list-item__center
list-item--material__center">
< div class="list-item__title
list-item--material__title">
GeeksforGeeks
</ div >
< div class="list-item__subtitle
list-item--material__subtitle">
This is subtitle
</ div >
</ div >
< div class="list-item__right
list-item--material__right">
< i class="ion-ios-star list-item__icon
list-item--material__icon">
</ i >
</ div >
</ li >
< li class = "list-item list-item--material" >
< div class="list-item__center
list-item--material__center">
< div class="list-item__title
list-item--material__title">
GFG
</ div >
</ div >
< div class="list-item__right
list-item--material__right">
< i class="ion-ios-hammer list-item__icon
list-item--material__icon">
</ i >
</ div >
</ li >
</ ul >
</ center >
</ body >
</ html >
|
Output:
Reference: https://onsen.io/v2/api/css.html#list-category