The Incredible Overcomplexity of the Shadcn Radio Button
Well, this is horrifying.
HTML lets you create the structure of a website.
CSS lets you make the website look nice.
JavaScript lets you change HTML and CSS. Because it lets you change HTML and CSS, it can do tons of things.
Well, this is horrifying.
This is a superb way to deprecate a little JavaScript library. Now that you can just use HTML instead, the website for Pikaday has been turned into a guide to choosing the right design pattern for your needs. Bravo!
Pikaday is no longer a JavaScript date picker. Pikaday is now a friendly guide for front-end developers. I want to push developers away from the classic date picker entirely. Especially fat JavaScript libraries.
- Building HTML pages is easy
- Pure HTML is evergreen
- Bloated web pages are too slow
- I can host it anywhere, often for free
- Accessibility and SEO benefits are automatic
- It won’t need security patches
- There are no build steps
dialog, details, datalist, progress, optgroup, and more:
If this article helps just a single developer avoid an unnecessary Javascript dependency, I’ll be happy. Native HTML can handle plenty of features that people typically jump straight to JS for (or otherwise over-complicate).
Many interactions are not possible without JavaScript, but that doesn’t mean we should look to write more than we have to. The server doing something useful is a requirement for building an interesting business. The client doing something is often a nice-to-have.
There’s also this:
It’s really fast
One of the arguments for a SPA is that it provides a more reactive customer experience. I think that’s mostly debunked at this point, due to the performance creep and complexity that comes in with a more complicated client-server relationship.
Some handy tips courtesy of Chris Ferdinandi.
Turning accessibility awareness into action with HTML.
Having fun with view transitions and scroll-driven animations.
Naming custom elements, naming attributes, the single responsibility principle, and communicating across components.
HTML web components for augmenting date inputs.