3 ms·
Show HN: Basecoat – All of the shadcn/ui magic, none of the React
In a nutshell: Basecoat is a port of shadcn/ui to HTML and Tailwind CSS. It's a modern, themeable component library; everything from buttons to comboboxes and dialogs.
Why? Well, I got sick of React and moved over to a more "old school" stack (Python, HTMX, Alpine.js and Tailwind).
The one thing I missed was shadcn/ui [1]. Nice defaults, well thought out design system, easy to theme and great to build your own component library with.
I didn't find the alternatives compelling: Flowbite, Preline and the likes encourage you to copy/paste dozens of classes for each element.
That's not how I use Tailwind. I love the utility-first approach, but I don't want walls of classes for each button, form element or tooltip I have in my app.
I had been building my own component library for a project I’m working on (a Vercel for Python apps) and realized it may be worth my time to firm things up.
Why I think it's cool? Well:
- No React. Just Tailwind CSS (with a tiny bit of Alpine.js if you choose to). You can use that with whatever stack you want.
- Jinja and Nunjucks macros. I hope to support more template engines.
- 100% compatible with shadcn/ui themes (you can play with the theme select box on the site).
- Super easy to install and use (there's even a CLI).
- Accessible, with ARIA support.
- Did I mention no React?
Hope some of you find it useful.
[1]: https://ui.shadcn.com/ https://ui.shadcn.com/
[2]: https://v4.shadcn.com/ https://v4.shadcn.com/ (this is actually the new/upcoming version of shadcn/ui).
- drivingmenuts 1y agoNot working in Safari. Did you, perchance, test this only in Chrome? A sampling of error messages: - Failed to load resource: Load cannot follow more than 20 redirections - Cross-origin script load denied by Cross-Origin Resource Sharing policy. - TypeError: window.basecoat.registerDialog is not a function. (In 'window.basecoat.registerDialog(Alpine)', 'window.basecoat.registerDialog' is undefined) - Alpine Expression Error: Can't find variable: sidebar and so on and so forth. It just goes downhill from there.
- hunvreus 1y agoI tested it in Safari, and just checked: I don't get any of these errors. Which page did you get that on? The front page?
- drivingmenuts 1y agoAnd … now it works. I didn't do anything different, but problem apparently solved.
- hunvreus 1y agoGood to hear. I was trying to figure out what I did wrong. Maybe a CDN issue. Thanks for checking it out.
- pbowyer 1y agoWell done, this looks like a great beginning! I'll be giving this a test on my next project. Hoping you add more of shadcn/ui, I'm partial to the sheet.