Onsen UI CSS Component Material List
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 is used to create the material list with list items using the below classes.
Onsen UI CSS Component Material List Classes:
- list–material: This class is used to create the material list.
- list-item–material: This class is used to create the material list item.
- list-item–material__center: This class is used to create the material list item in the center.
- list-item–material__title: This class is used to create the material list item title.
- list-item–material__subtitle: This class is used to create the material list item subtitle.
Syntax:
<ul class="list list--material"> <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"> ... </div> <div class="list-item__subtitle list-item--material__subtitle"> ... </div> </div> </li> ... </ul>
Example 1: The following example demonstrates the Onsen UI CSS Component Material List.
HTML
<!DOCTYPE html> < html > < head > <!-- CDN links of Onsen UI library --> < link rel = "stylesheet" href = "https://unpkg.com/onsenui/css/onsenui.css" > < link rel = "stylesheet" href = "https://unpkg.com/onsenui/css/onsen-css-components.min.css" > < script src = "https://unpkg.com/onsenui/js/onsenui.min.js" > </ script > </ head > < body > < center > < h1 style = "color: green;" > w3wiki </ h1 > < h3 > Onsen UI CSS Component Material List </ h3 > < ul class = "list list--material" > < 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 Material list item </ div > </ 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"> w3wiki </ div > </ div > </ li > </ ul > </ center > </ body > </ html > |
Output:
Example 2: The following example demonstrates the Onsen UI CSS Component Material List.
HTML
<!DOCTYPE html> < html > < head > <!-- CDN links of Onsen UI library --> < link rel = "stylesheet" href = "https://unpkg.com/onsenui/css/onsenui.css" > < link rel = "stylesheet" href = "https://unpkg.com/onsenui/css/onsen-css-components.min.css" > < script src = "https://unpkg.com/onsenui/js/onsenui.min.js" > </ script > </ head > < body > < center > < h1 style = "color: green;" > w3wiki </ h1 > < h3 > Onsen UI CSS Component Material List </ h3 > < ul class = "list list--material" > < 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 Material list item </ div > < div class="list-item__subtitle list-item--material__subtitle"> A Computer Science portal for Beginner. </ div > </ 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"> w3wiki </ div > < div class="list-item__subtitle list-item--material__subtitle"> Portal for Beginner. </ div > </ div > </ li > </ ul > </ center > </ body > </ html > |
Output:
Reference: https://onsen.io/v2/api/css.html#list-category
Contact Us