GeForce RTX 4090
GeForce RTX 4090

Reputation: 3498

Ionic [clear] property not working for a button

I am trying to make a button transparent and Ionic docs say that the clear attribute does the trick. However, when I try it - it doesn't. Am I doing something wrong?

<button *ngIf="showAddButton" [clear]="true" ion-button (click)="addButtonClicked()">
    <ion-icon  ios="ios-add" md="ios-add"></ion-icon>
  </button>

Upvotes: 0

Views: 1653

Answers (2)

H S W
H S W

Reputation: 7119

Setting the fill="clear" makes ion-button transparent.

  <ion-button
    expand="block"
    class="login-button"
    fill="clear"
    (click)="login()">
    Login
  </ion-button>

Upvotes: 1

Sachila Ranawaka
Sachila Ranawaka

Reputation: 41377

Add clear ass attribute

<button *ngIf="showAddButton" clear ion-button (click)="addButtonClicked()">
    <ion-icon  ios="ios-add" md="ios-add"></ion-icon>
  </button>

or with attr

[attr.clear]="true"

doc

Upvotes: 1

Related Questions