正在加载视频...

视频加载失败

How to transform a shadcn switch into a pricing toggle ↓

109,133 次观看 • 1 年前 •via X (Twitter)

8 条评论

Pasquale Vitiello 的头像
Pasquale Vitiello1 年前

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 的头像
Yann Birba - 🦋 @yannbirba.fr1 年前

@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 的头像
LioRael1 年前

@shadcn why not tabs?

Fabrizio Calderan 的头像
Fabrizio Calderan1 年前

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

Soham Dasgupta 🇮🇳⚽ 的头像
Soham Dasgupta 🇮🇳⚽1 年前

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

Sergiu 🤖 AI Directories 的头像
Sergiu 🤖 AI Directories1 年前

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

Mike Majara 的头像
Mike Majara1 年前

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

alex 的头像
alex1 年前

@shadcn this is neat but don't do this

相关视频

How to transform yourself into Catwoman
1:59

Sensitive content

How to transform yourself into Catwoman

yuzupyon

24,620 次观看 • 10 个月前