Live data from Hacker News

The Overcomplexity of the Shadcn Radio Button

paulmakeswebsites.com

11–20 of 351 posts

Re: The Overcomplexity of the Shadcn Radio Button

#12
post #7

The shadcn radio button in action: https://ui.shadcn.com/docs/components/radio-group

This interactivity definitely adds a wow effect.

Is it sarcastic or does it appear only on high frame rate devices? To me it simply feels like another radio button.

Re: The Overcomplexity of the Shadcn Radio Button

#15

Well Shadcn gives you more freedom to fix stuff like this and rewrite how you want the component to work and look, since everything lives in your own code base. In a regular component lib it would be less likely that you'd think about this complexity, since it would be "hidden" away in node_modules or even transpiled and minified.

> everything lives in your own code base

A common misconception.

In reality Shadcn is a thin wrapper around libraries such as Radix, recharts, etc. The article says as much.

Re: The Overcomplexity of the Shadcn Radio Button

#16
post #10

I normally share the sentiments of the article. But I am also curious, if the goal was: - Implement the radio as the designer sent in the figma file (e.g. something like the radix demo one they're commenting on: https://www.radix-ui.com/primitives/docs/components/radio-gr... ) - Make sure it looks the exact same across all browsers How doable is it with vanilla css? The example they gave was rendered to a black/white…

Where do you draw the line tho? How many kilobytes and how much future maintenance work is avoiding a potential slight visual inconsistency with a radio button worth? Is it worth to lose the x amount of people who have bad network connection?

Use this approach everywhere and the actual content of the page (you know: the stuff people came for) suffers.

All I can think about is a quote by world famous video artist Nam June Paik: When to perfect, Gott böse ("God gets mad when too perfect", the original isn't exactly a full sentence and mixes English and German).

Re: The Overcomplexity of the Shadcn Radio Button

#17
post #7

Earlier quoted context omitted.

This interactivity definitely adds a wow effect.

Is it sarcastic or does it appear only on high frame rate devices? To me it simply feels like another radio button.

> Is it sarcastic or does it appear only on high frame rate devices? To me it simply feels like another radio button.

You're absolutely right!

Today I'm using a friends gaming computer. It's a 244hz monitor powered by a RTX 5070 TI and a screamingly fast AMD Ryzen 7 9800X3D CPU with 128GB of overclocked 6000MT/s RAM.

Not only does the radio look mundane for such overcomplicated component, but it also misses clicks where I would expect it to register. Like slightly above or below it.

For example, clicking where the pointer is in this image does NOT select the first radio button. It's not forgiving with regards to precision.

https://i.imgur.com/PNoCJeL.png

Re: The Overcomplexity of the Shadcn Radio Button

#18
This is the reason I absolutely hate shadcn. The number of dependencies and files you introduce for trivial components is insane. Even tiny little divs are their own component for no good reason. I genuinely don’t understand how front-end developers accept this level of needless complexity.

Shoutout to Basecoat UI[1], so implementing the same components using Tailwind and minimal JS. That's what I am preferring to use these days.

[1]: https://basecoatui.com/

Re: The Overcomplexity of the Shadcn Radio Button

#19
post #13
post #8

Did they ask the original authors of Radix why it's the way it is?

Exactly this. OP fails to understand that there are reasons why it was done this way, and that someone who spent thousand of hours working on this might know something that they don't.

Can here to say this exactly. Not saying they don’t raise an interesting point but the complete lack of curiosity why a group of experts in simplicity and accessibility decided to take this path is jarring
Post reply on HN