Загрузка видео...

Не удалось загрузить видео

На главную

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

Похожие видео