New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: would love to have different sized switches. #24
Comments
You can do something like this in your css:
Then just add the class "small" to your input like this: You could of course change the class name to whatever you want and the sizes as well. I just did half the size in this example. |
@faoiseamh, as @tkh44 noted, sizes are manageable by CSS only. I intentionally didn't include any size manipulations of the switch element by JavaScript, so that it could be easier for people that use it, to change it's size and overall look. The main CSS file 'switchery.css` is only default style, you are free to play around with it and do whatever you like with your switches, including making them smaller, as you want in your case. |
Great, thanks guys. I didn't look into doing at the time, but I totally agree with keeping styling in CSS. |
Why not include different predefined sizes then like bootstrap? |
.small + .switchery { .small + .switchery > small { That's pretty slick. Thanks tkh44. |
These switches are great, but they'd be even better with a small version to fit into smaller UI areas. I will build this if I have some more time down the road, but logging for now in case anyone else wants to sooner.
The text was updated successfully, but these errors were encountered: