The Incredible Overcomplexity of the Shadcn Radio Button

Chris Coyier Chris Coyier on

A radio button is this:

<input type="radio" name="foo">Code language: HTML, XML (xml)

Paul Hebert took at fair look at how Shadcn turns that into 45 lines of code and three imports, which in turn uses Radix which is 215 lines of code and 7 more imports. But do you get better accessibility? No, it’s arguably worse. But do you get ease of styling? Also no.

Wanna learn React deeply?

Leave a Reply

Your email address will not be published. Required fields are marked *

$966,000

Frontend Masters donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.