Color bar on the left or right side of an ion-card


On the start page of, there is an example with cards, that have green, blue or black line on the top of the cards. How to do that for the top or the left or right side?

Can you give me an hint, how to find out, how to change the elements?



You need create CSS classes and use it.


Did it by extending my home.scss (page where the cards are used in):

.home {
        border-right: 5px solid green;

        border-right: 5px solid red;

In my home.html i extended the card definition by following (it is conditional and depens on the result of in a *ngfor - loop):

<ion-card [ngClass]="{true:'ion-card-active', false:'ion-card-inactive'}[]">