Onsen UI CSS Component Tappable List
Last Updated :
30 Jun, 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 Tappable List is used to create the tappable list items using the list-item–tappable class.
Onsen UI CSS Component Tappable List Class:
- list-item–tappable: This class is used to create the tappable list items.
Syntax:
<ul class="list">
<li class="list-item
list-item--tappable">
<div class="list-item__center">
...
</div>
</li>
...
</ul>
Example 1: The following example demonstrates the Onsen UI CSS Component Tappable List.
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 Tappable List
</ h3 >
< ul class = "list" >
< li class = "list-item list-item--tappable" >
< div class = "list-item__center" >
Java
</ div >
</ li >
< li class = "list-item list-item--tappable" >
< div class = "list-item__center" >
Python
</ div >
</ li >
</ ul >
</ center >
</ body >
</ html >
|
Output:
Example 2: The following example demonstrates the Onsen UI CSS Component Tappable List.
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 Tappable List
</ h3 >
< ul class = "list" >
< li class = "list-item list-item--tappable" >
< div class = "list-item__center" >
< div class = "list-item__title" >
Java
</ div >
</ div >
< div class = "list-item__right" >
< i class="ion-ios-calendar
list-item__icon">
</ i >
</ div >
</ li >
< li class = "list-item list-item--tappable" >
< div class = "list-item__center" >
< div class = "list-item__title" >
Python
</ div >
</ div >
< div class = "list-item__right" >
< i class="ion-ios-star
list-item__icon">
</ i >
</ div >
</ li >
< li class = "list-item list-item--tappable" >
< div class = "list-item__center" >
< div class = "list-item__title" >
C++
</ div >
</ div >
< div class = "list-item__right" >
< i class="ion-ios-menu
list-item__icon">
</ i >
</ 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...