Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ionic 4 increase checkbox icon size

I'm trying to increase the icon size in ion-checkbox but I couldn't find a way to do.

I tried font-size, --size properties but they are increasing the overall width and height of the background instead of the check icon.

enter image description here

HTML

<ion-checkbox
        color="secondary"
        slot="start"
        size="large">
</ion-checkbox>

CSS

ion-checkbox {
    --background: var(--background-color);
    --background-checked: var(--background-color);
    --checkmark-color: var(--color-blue-medium);
    --border-color: transparent;
    --border-color-checked: transparent;
   /* increasing overall width not the check icon size */
    --size:48px;
}
like image 936
Gangadhar JANNU Avatar asked Oct 29 '25 07:10

Gangadhar JANNU


1 Answers

Size of the icon can be modified by the zoom property in style.

In .scss file

   .my-icon { zoom : 2.0;}

In .html file

<ion-icon class="my-icon"></ion-icon>
like image 166
H S Progr Avatar answered Oct 31 '25 02:10

H S Progr