Make Ionic Toggle smaller?

Hey everyone,

Does anyone know how to make the Ionic Icon smaller? Or know of any nicer looking options that has the ability to adjust size? :slight_smile:

image

2 Likes

Hi @lantzgould,

Set some specific document id (like Test1234) for this icon . And added html element near to this tag.
place below style to html element, then the Toggle will get small.

#Test1234 .ionic-track{ width: 40px; height:20px; border-radius:20px; } #Test1234 .ionic-handle{ width: 17px; height: 17px; border-radius: 17px; }
5 Likes

Thank you!

Can someone specify how to execute the solution? Thanks.

Hi @stieger,

Here’s how I usually do it:

Download the plugin:

  1. Drop a CSS element on the page
  2. Start workflow on page load
    image
  3. Give the toggle (using Ionic Icons Plugin) an element ID
    image
  4. On the workflow, use this:

#togprice .ionic-track{ width: 40px; height:20px; border-radius:20px; } #togprice .ionic-handle{ width: 16px; height: 16px; border-radius: 16px; }

The ID can be anything you want. You can adjust the height and weight to your liking too.

Hope this helps.

-Brandon

8 Likes

Thanks a lot! I wasn’t aware of the plugin…

  • Peter
1 Like

Feel free to try this plugin too if you like

5 Likes

Nice! Hadn’t seen this one. Thanks for the share. :slight_smile:

Very nice! Right what I was looking for!
Thanks for sharing.

Hi @ryley.randall

It will be great to add auto-binding, so I can switch :slight_smile:

Hi @lantzgould

How to fix the distance of the circle (handle)?


Screen Shot 2020-01-23 at 3.03.54 PM


off position is ok.
image


Hi @JohnMark!

This one is making me scratch my head for some reason… @AliFarahat any css expertise help you can provide? :slight_smile:

If I figure this out I’ll reply back here

1 Like

I found this, but can make it work :slight_smile:

ion-toggle {
   zoom:0.8;
}

:thinking: Hmmm…

@lantzgould According to Chrome, we are near :slight_smile:



I used left: 0%, look the result :joy:

image

LOL! Still scratching my head on this… adjusting the numbers shouldn’t make that overflow only on one side

Scratching in progress :slight_smile: Pretty sure is about position: absolute.

Hi @JohnMark @lantzgould and futur visitor !

In order to fix the issue, play with the transform property and try to modify the translate3d function parameters.

I did this for a 30px width toggle :

ionic toggle

1 Like

Bildschirm­foto 2023-02-27 um 11.40.26