menu

Ionic 2 Cards


Ionic 2 Cards : Cards are basically used to display the important pieces of content, and emerging as the core design pattern for apps. Cards are great way to display the information in organised format. Cards are widely used by companies like – google, twitter and have become one of the most popular design pattern. Here in this tutorial we are going to explain how to create cards in Ionic 2. You can also use our Online tool to run the example and see the output.


Ionic 2 Cards Example

Cards are important component of the apps, it allows to display the same information on different size of screens. It is very simple to create Cards in Ionic 2. Let us understand the cards one by one-

  • 1. Basic Cards
  • 2. Card Headers
  • 3. Card Lists
  • 4. Card Images
  • 5. Background Images
  • 6. Advanced Cards

Let us go one by one to understand the Ionic 2 Cards-

Basic Cards

Cards are basically css component. You can create basic cards simply as below-

Basic Card Header Example

Try it »

The output of the above example will look something like this –

Ionic 2 Cards Example

Card Headers

ion-card-header component is used to add the Header in card. Here is simple example of card headers-

Card Headers Example

Try it »

The output of the above example will look something like this –

Card Headers Example

Lists In Cards

ion-list component is used to create card lists in Ionic 2. Here is simple example of Lists In Cards-

Lists In Card Headers Example

Try it »

The output of the above example will look something like this –

Ionic 2 Lists Cards

Images In Cards

We sometimes need to add images in cards, It is very simple to add images in Cards. Here is an example of Images in Cards.

Ionic 2 Card Images Example

Try it »

The output of the above example will look something like this –

Ionic 2 Card Images

Background Images In Cards

You can set background images in Cards simply adding the image source url as below-

Background Images in Cardss Example

Try it »

The css used in the above example is given below, please don’t forget to add this to add the styles for title and subtitle.

Card Background Image Css:

The output of the above example will look something like this –

Ionic 2 Set Cards Background