Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ionic List

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:



  • ...

Try it »

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 ...

Try it »


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.

A list item, when using or ...

Try it »


List with Avatars

Use item-avatar to create a list with avatars:





Try it »


Thumbnail List

The item-thumbnail-left class is used to add a left-aligned thumbnail, and item-thumbnail-right for a right-aligned thumbnail.





Try it »


Inset List

We can inset a list within a container; the list will not display at full width.

The style for an inset list is: list list-inset. The difference from a regular list is that it sets a margin (marign), similar to a tab.

An inset list has no shadow effect, which looks better when scrolling.



Raiders of the Lost Ark
...

Try it »