Onsen UI CSS Component Right Label in List Item
Last Updated :
03 Jul, 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.
Lists are used to store data or information on web pages in ordered or unordered form. Onsen UI CSS Component Right Label in List Item is used to create the label on the right side of the list item using the below classes.
Onsen UI CSS Component Right Label in List Item Classes:
- list-item__right: This class is used to create the list item on the right side.
- list-item__label: This class is used to create the label in the list item.
Syntax:
<ul class="list">
<li class="list-item">
<div class="list-item__center">
...
</div>
<div class="list-item__right">
<div class="list-item__label">
...
</div>
</div>
</li>
</ul>
Example 1: The following example demonstrates the Onsen UI CSS Component Right Label in List Item.
HTML
<!DOCTYPE html>
< html >
< head >
< 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
Right Label in List Item
</ h3 >
< ul class = "list" >
< li class = "list-item" >
< div class = "list-item__center" >
GeeksforGeeks
</ div >
< div class = "list-item__right" >
< div class = "list-item__label" >
Right label
</ div >
</ div >
</ li >
</ ul >
</ center >
</ body >
</ html >
|
Output:
Example 2: The following example demonstrates the Onsen UI CSS Component Right Label in List Item by specifying the icons on the right.
HTML
<!DOCTYPE html>
< html >
< head >
< 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
Right Label in List Item
</ h3 >
< ul class = "list" >
< li class = "list-item" >
< div class = "list-item__center" >
Java
</ div >
< div class = "list-item__right" >
< div class = "list-item__label" >
< i class="ion-ios-star
list-item__icon">
</ i >
</ div >
</ div >
</ li >
< li class = "list-item" >
< div class = "list-item__center" >
Python
</ div >
< div class = "list-item__right" >
< div class = "list-item__label" >
< i class="ion-ios-hammer
list-item__icon">
</ i >
</ div >
</ div >
</ li >
</ ul >
</ center >
</ body >
</ html >
|
Output:
Reference: https://onsen.io/v2/api/css.html#list-category
Share your thoughts in the comments
Please Login to comment...