The Overcomplexity of the Shadcn Radio Button
paulmakeswebsites.com
The Overcomplexity of the Shadcn Radio Button
1–10 of 351 posts
Re: The Overcomplexity of the Shadcn Radio Button
#2I have absolutely no doubt that somehow all these projects and similar ones - started with good intentions - good looking UI, implement and forget. And then, one fine day you're sitting on top of 200+ lines of code for a radio button and 7 imports and it's too hard to go back now without tearing the whole codebase apart. This is how code rot starts.
Re: The Overcomplexity of the Shadcn Radio Button
#3and people complain about AI code?
Re: The Overcomplexity of the Shadcn Radio Button
#4Well 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.
Re: The Overcomplexity of the Shadcn Radio Button
#5There has to be a reason for picking button instead of input type="radio", right?
Re: The Overcomplexity of the Shadcn Radio Button
#6The shadcn radio button in action: https://ui.shadcn.com/docs/components/radio-group
Re: The Overcomplexity of the Shadcn Radio Button
#7The shadcn radio button in action: https://ui.shadcn.com/docs/components/radio-group
This interactivity definitely adds a wow effect.
Re: The Overcomplexity of the Shadcn Radio Button
#8Did they ask the original authors of Radix why it's the way it is?
Re: The Overcomplexity of the Shadcn Radio Button
#9and people complain about AI code?
[deleted]
Re: The Overcomplexity of the Shadcn Radio Button
#10I 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 circle, most teams wouldn't ship that.