Open In App

Onsen UI CSS Component Material List Title

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.

Onsen UI CSS Component Material List Title is used to create the material list title at the top of the list items. To create a material list and title, we will use list-title–material and list–material classes.

Onsen UI CSS Component Material List Title Classes:

  • list-title–material: This class is used to create the material list title.
  • list–material: This class is used to create the material list.
  • list-item–material: This class is used to create the material list items.

Syntax:

<h3 class="list-title list-title--material">
    ....
</h3>
<ul class="list list--material">
  <li class="list-item list-item--material">
    ...
  </li>
  ...
</ul>

Example 1: The following example demonstrates the Onsen UI CSS Component Material List Title.

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 List Title
        </strong>
          
        <div class="list-title list-title--material">
            This is list Title
        </div>
        <ul class="list list--material">
            <li class="list-item list-item--material">
                GFG item 1
            </li>
            <li class="list-item list-item--material">
                GFG item 2
            </li>
        </ul>
    </center>
</body>
  
</html>


Output:

 

Example 2: The following example demonstrates the Onsen UI CSS Component Material List Title.

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 List Title
        </strong>
          
        <div class="list-title list-title--material">
            Title is GEEKSFORGEEKS
        </div>
        <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">
                        GFG
                    </div>
                    <div class="list-item__subtitle">
                        Java
                    </div>
                </div>
            </li>
            
            <li class="list-item list-item--material ">
                <div class="list-item__center">
                    <div class="list-item__title">
                        GeeksforGeeks
                    </div>
                    <div class="list-item__subtitle">
                        Python
                    </div>
                </div>
            </li>
        </ul>
    </center>
</body>
  
</html>


Output:

 

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



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