Replies: 3 comments 1 reply
-
Try this component, i only worked on the size, you will need to do the same for "variant"
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I think this might work.
Use :
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey guys, I have opened a pr #7930 that improves the switch component sizing flexibility and can help with adding a size prop. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Shadcn's Button component has an option to chose between different sizes. i want to do the same with Switch component.
what is the best approach to achieve this.
I've tried to add variants just like Button component both for switch root and switch thumb:
but I'm not sure how to add these variants to the switch component.
is this event the right way to do this?
or should i just create another switch component and add shadcn's switch as a child?
something like this:
Beta Was this translation helpful? Give feedback.
All reactions