Loading video...

Video Failed to Load

Go Home

How to transform a shadcn switch into a pricing toggle ↓

109,133 views • 1 year ago •via X (Twitter)

8 Comments

Pasquale Vitiello's profile picture
Pasquale Vitiello1 year ago

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 👍

Yann Birba - 🦋 @yannbirba.fr's profile picture
Yann Birba - 🦋 @yannbirba.fr1 year ago

@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.

LioRael's profile picture
LioRael1 year ago

@shadcn why not tabs?

Fabrizio Calderan's profile picture
Fabrizio Calderan1 year ago

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

Soham Dasgupta 🇮🇳⚽'s profile picture
Soham Dasgupta 🇮🇳⚽1 year ago

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

Sergiu 🤖 AI Directories's profile picture
Sergiu 🤖 AI Directories1 year ago

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

Mike Majara's profile picture
Mike Majara1 year ago

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

alex's profile picture
alex1 year ago

@shadcn this is neat but don't do this

Related Videos

How to transform yourself into Catwoman
1:59

Sensitive content

How to transform yourself into Catwoman

yuzupyon

23,795 views • 10 months ago