How to transform a shadcn switch into a pricing toggle ↓
@pacovitiello13K followers
109,333 views
8 Comments
Comments from the original post on X (Twitter)

@pacovitiello
Things got a bit lively on this one 😀 @yann_birba, you’re right—using a switch probably wasn’t the best call for a pricing toggle, especially since switches typically show two states of the same thing (like “Lights On/Off”) rather than two distinct options. Thank you all for your feedback; I appreciate your input 👍
10 likes

@yann_birba
@shadcn For accessibility concerns. I think it's simple radio inputs. Not a switch. Switch must be used to toggle something not choose between 2 values.
28 likes

@lio_rael
@shadcn why not tabs?
20 likes

@fcalderan
@shadcn A no-tailwind and more accessible version with radioboxes
7 likes

@thesobercoder
@shadcn After watching this, I can confidently say that I don't know how to use Tailwind! 🤷♂️
6 likes

@s_chiriac
@shadcn I wish I could code like this. I’m more like… Cursor, now I want the button on the left. 😂
4 likes

@mikemajara
@shadcn Cool stuff!! It's actually been a while since I see a human coding. Looks vintage
3 likes

@alexwohlbruck
@shadcn this is neat but don't do this
3 likes
