Customize toggle checkbox #1700
-
Hello, I would like to customize the toggle checkbox and I'm wondering if there is a recommended way to do that. I need a standalone toggle checkbox, a switch button, without label because I will use Can you help me? |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 2 replies
-
You can leave the
The recommended way to customize the FUI components is modify the LESS files for specific components. Here are the variables and overrides of the checkbox component for default theme. You can turn this into your own theme by creating the theme folder under |
Beta Was this translation helpful? Give feedback.
-
Thank you. |
Beta Was this translation helpful? Give feedback.
-
I don't think the size options for the checkbox are not common things. They mostly have the unique size and consistent design across the system. It is more likely to depend per project and requirement that you can customize with your theme. Otherwise, you can contribute by submitting your PR for this implementation. |
Beta Was this translation helpful? Give feedback.
-
I agree about not having size options for common checkboxes. It is too big for my application. I think having classes for sizing could be useful. |
Beta Was this translation helpful? Give feedback.
-
Well, I mean every types of checkbox module including toggle, and slider. If you think the size doesn't suit for your application, you can customize as explained above. But, I don't see any reason to add size variations, since it's not common use case with various sizes for toggle in single application, whereas you could have various sizes for buttons and fields. So, you should better set your suitable size for your checkbox module. |
Beta Was this translation helpful? Give feedback.
-
Why do we have size variations for buttons and fields and we don't have them for toggle and slider checkboxes? |
Beta Was this translation helpful? Give feedback.
-
@smartm0use I've tried a little play and these values will give you 30% smaller size which still look good.
|
Beta Was this translation helpful? Give feedback.
-
Great! Thank you! |
Beta Was this translation helpful? Give feedback.
-
@lubber-de check this out please: |
Beta Was this translation helpful? Give feedback.
@smartm0use I've tried a little play and these values will give you 30% smaller size which still look good.