Skip to content
Advertisement

Ionic ion-searchbar increase size of clear icon

is there a way to increase the size of the clearIcon on ion-search component?

 <ion-card-content>
  <ion-searchbar
    mode="ios"
    autocomplete="off"
    autocorrect="off"
    spellcheck="false"
    animated="true"
    debounce="500"
    clearIcon="close"
    [placeholder]="placeholder"
    [(ngModel)]="search"
    (ionChange)="runSearch()"
  ></ion-searchbar>
</ion-card-content>

enter image description here

Advertisement

Answer

Add this to global.scss, changing the width value as per your requirement

.searchbar-clear-icon {
    width: 30px !important;
}
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement