ionic List
A list is a widely used interface element, used in almost all mobile apps.
A list can be basic text, buttons, toggles, icons, and thumbnails, etc.
A list item can be any HTML element. The container element needs the list class, and each list item needs the item class.
ionList and ionItem can easily support various interactions, such as swipe editing, drag sorting, and deleting items.
Basic usage:
-
...
List Dividers
We can use the item-divider class to create dividers for a list; by default, list items are distinguished by different background colors and bold fonts, but you can also easily customize them.
Candy Bars
Butterfinger
...
List with Icons
We can specify icons on the left or right side of a list item.
Use item-icon-left for an icon on the left, item-icon-right for an icon on the right. If you need icons on both sides, just add both classes.
In the following example, we use the tag in the list items, making each list item clickable.