frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Basecoat – shadcn/UI components, no React required

104•hunvreus•13h ago
Basecoat ports the upcoming shadcn/ui v4 [1] to plain HTML + Tailwind (no React):

- Live demo & documentation: https://basecoatui.com

- MIT‑licensed and free: https://github.com/hunvreus/basecoat/

- Works with any backend (Flask, Django, Rails, PHP, etc.) or static site.

- Fully theme‑compatible with shadcn/ui [2].

- Uses a sliver of Alpine.js only for a few interactive bits (e.g. combobox). Swap in your own JS if you prefer.

- Dead simple to use, just drop in a class here and there:

  <button class="btn" data-tooltip="This is a tooltip text">Click me</button>
Why I built it: after moving from a Next.js stack back to Flask + Tailwind + HTMX, I missed shadcn/ui and didn’t want walls of Tailwind classes (like Flowbite or Preline).

Feedback is most welcome: bugs, requests for components, criticism.

[1]: https://v4.shadcn.com/

[2]: https://basecoatui.com/installation/#install-theming

[3]: https://pagescms.org

Comments

BenderV•11h ago
Awesome. Using Vue/Tailwind, I'm definitely interested in this. Maybe you could try to add examples of integrations with others frameworks? I'll play with it and give you my 2 cents.
hunvreus•10h ago
Hello there Ben. Sure thing, I'll try and expand the docs.
codybontecou•6h ago
Not sure if you're aware, but there's a well-supported Vue ShadCN library: https://www.shadcn-vue.com/
hunvreus•1h ago
Yeah, it's excellent.
replwoacause•10h ago
Looks nice! Can you add a CDN option? Would be nice for a quick start to play around.

Also, reminds me of https://franken-ui.dev

hunvreus•10h ago
Yep, I've been considering adding a CDN option.

I think it may be on the heavier side though (~100k).

pacmanche•9h ago
Now you just need to remove Tailwind
revskill•8h ago
And then ?
campak•7h ago
and then... that solves the issue of a Tailwind dep
7bit•6h ago
If deps are a problem for you, don't use basecoat.
hunvreus•1h ago
I think it's a fair ask.

Being able to just add one line to import the CSS styles and being able to get up and running quickly (like Alpine.js or HTMX do).

Not great if you're trying to build a serious production app, but great if you're just building a simple proof-of-concept or simple tool.

hunvreus•8h ago
If I offer a CDN version, it will be Tailwind-free.
yawnxyz•7h ago
Yes please! Even if we have to add the tailwind as a CDN, this would be useful — as we don't have to use npm / yarn to build the project anymore.

(I like building pure html files in alpine)

o_m•8h ago
Why did you decide going old school using Alpine.js instead of using plain vanilla web components?
edoceo•6h ago
Alpine is old school now?
o_m•3h ago
I'd say anything new in 2025 that involves working with the DOM that doesn't use web component is a waste. Lately I have been porting some old JS libraries (7+ years old) that still are visually impressive to web components, and in my experience after porting some libraries there is about 30% fewer lines of code. Before web components there was so much work to get things up and running in the DOM. Alpine.js does this behind the scenes, but there isn't really a need for it anymore.
hunvreus•1h ago
I did seriously consider it, but again that was about trying to solve the problem in the least opinionated way.

Which is also why I made the Alpine code as unobtrusive as possible.

You can get away with using purely the CSS if you don't need dialogs or combobox. And you can plug your own JS if you decide to do so.

However, I will definitely try and see if I can make a web components version as soon as I have some time.

campak•7h ago
I dig it. Love this
hunvreus•59m ago
Great, let me know if you end up using it.
gsanderson•7h ago
Looks great!

One suggestion would be adding a focus trap, such as when a Dialog opens. It's nice to use the tab key to move around the Dialog (inputs and buttons). Currently focus leaves to the page behind. It might be as simple as adding https://alpinejs.dev/plugins/focus#x-trap

hunvreus•1h ago
Yeah, I looked into it but wanted to avoid adding plugins.

I already do a bit of (simple) focusing here and there, so it shouldn't leave the focus on the background:

https://github.com/hunvreus/basecoat/blob/main/src/js/dialog...

But more complex scenario require you to be specific about the field you want to see focused. I was thinking about allowing you designate the field to focus on.

What would you suggest?

diiiimaaaa•7h ago
So if I understand correctly all JS is custom-written Alpine JS components.

And all CSS is custom classes that use Tailwind @apply, I'm not sure why, can someone elaborate.

hunvreus•1h ago
- I prefer using Alpine rather than Vanilla JS these days. But the JS code is only for dialogs, combobox and tabs. I don't even use it myself on most simple projects. Curious what you would recommend using instead? Web components?

- I use `@apply` in all of my custom Tailwind classes. It's easy to keep it consistent with the rest of your styles, and in this case it meant it was pretty easy for me to copy a good chunk of shadcn/ui's own components. You usually just use regular CSS for custom Tailwind utility classes?

boxed•7h ago
Can someone eli5 how this is different from something like bootstrap?
wafadaar•7h ago
Bootstrap is a completely different framework with a different design language (one that many may precieve as out of fashion). This library/framework allows folks to use ShadCN (a component library) similar to Bootstrap which is only available through React/Vue/Svelte, etc.. with vanilla HTML.
boxed•7h ago
So it's different in visual design, but the goal here is actually to make shadcn more like bootstrap? Hmm.. I think I like that.
hunvreus•1h ago
Kinda, yeah. The goal is to make it possible for any web dev to use shadcn/ui with a regular HTML + CSS setup. No React. No Vue. Just whatever you're already using (e.g. Rails, Laravel, Django, ...).
christoff12•7h ago
crayons vs colored pencils
jmisavage•7h ago
FYI I don't think all of your styles are loading on the page. Tried safari and firefox and it doesn't look right.
hunvreus•1h ago
Would you mind sending me a couple of screenshots at hunvreus@gmail.com, or adding it to an issue at https://github.com/hunvreus/basecoat/issues?

It would be incredibly helpful for me to debug.

WilcoKruijer•7h ago
Very cool! Are you manually porting all components or are you using some sort of automated process?
hunvreus•58m ago
All manual. It was a bit of work at first, but mostly because I had to decide how to structure them. It's actually quite straightforward to extend and maintain now.
zeroq•7h ago
>> Works with any backend

Have you fully tested it with Solaris or AIX? /s

hunvreus•1h ago
You had me reminisce of my uni days, logging into the Solaris stations pretty much every day. That purple wallpaper is etched into my eyes.
exiguus•6h ago
> Why I built it: after moving from a Next.js stack back to Flask + Tailwind + HTMX, I missed shadcn/ui and didn’t want walls of Tailwind classes (like Flowbite or Preline).

I understand that Next.js can feel bloated, especially when used as a static site generator or within a classic JAMStack setup.

Basecoatui reminds me a bit of Bootstrap during the golden era of Ruby on Rails.

I took a look at the Git repository and tried to find an automated solution to convert shadcn to plain HTML but didn't find anything suitable. Is there a script available for this, or was this done manually?

hunvreus•1h ago
It was all done manually.
tegdude•6h ago
Thank you! I was searching for this exact thing the other week.
hunvreus•1h ago
That's great to hear. Do let me know if you see any bug or missing component (I'm planning on adding the command component for example).
jacktheturtle•6h ago
this is awesome, thanks for creating it
hunvreus•59m ago
My pleasure.
Jonovono•6h ago
This is awesome. I did the same and have been using AlpineJS Pines UI library. Been pretty happy with it! But will take a look at this
hunvreus•1h ago
Pines is really neat. I just don't like the wall of classes, but super neat nonetheless.
czhu12•5h ago
Really great! A major downside of moving from SPA's back to vanilla JS is how much you lose in terms of UI components.

I've normally done DaisyUI + Tailwind + Rails but it never feels quite right. Basecoat is a really nice step forward.

I have to imagine the author is planning to charge for a premium package at some point, but given that a huge % of development is spent on UI design, I'd be more than happy to pay for a year of updates.

hunvreus•1h ago
Glad you like it. Do let me know what you end up building with it.

> I've normally done DaisyUI + Tailwind + Rails but it never feels quite right.

Same here: I could never quite get into Flowbite, Daisy UI, Preline or any of the other many alternatives.

> I have to imagine the author is planning to charge for a premium package at some point,

I did wonder if people would want to buy premium layouts or components. No plan to charge for anything for now though.

rglullis•5h ago
Would you be interested in getting rid of Tailwind and have the styling strictly with SASS mixins?
hunvreus•1h ago
Yes, I wanted to export it as a raw CSS build and host it on a CDN.

Feel free to watch the project if you want to be notified when I get that out.

urbanisierung•5h ago
This is great! Thanks for implementing this!
hunvreus•1h ago
My pleasure.
klaussilveira•4h ago
This is great! The HTMX community needs more friendly UI kits like this.
hunvreus•1h ago
Are you the HTMX CEO?
anon1094•4h ago
Glad you shared this. Looks nice!
hunvreus•1h ago
Thanks! Let me know if you build anything cool with it.
drcongo•4h ago
This looks great. I've never used React so had never heard of shadcn, and annoyingly I've just got to the point in a side project where pulling out DaisyUI and replacing it with this might be a bit of a chore.
hunvreus•1h ago
Do let me know if you end up using this. I'd love to get real life feedback on using it.
diordiderot•4h ago
Absolutely love this. Wanted to do this myself but never enough to get started. You're a legend.
hunvreus•1h ago
Thanks a lot, I got this done over the course of a few weeks and had no idea whether people would find this helpful. Looking forward to seeing others using it in the wild.
juddlyon•4h ago
There’s a huge need for this, thank you! I build server-rendered marketing sites and there’s a huge gulf between the jQuery and React era.
hunvreus•1h ago
Have you played with Alpine.js before? HTMX?

I think you can get quite far these days WITHOUT React or Vue.js (and I say that as the maintainer of a Next.js/React open source project [1]).

[1]: https://pagescms.org

juddlyon•38m ago
Yep, I’ve used Alpine extensively and HTMX here and there. Lots of Vue.

There are not sets of polished, battle-tested UI libraries made for server side. Bootstrap ships with JS, but most of the CSS and template frameworks assume you’re using a headless setup.

I thought Web Components might spur things, but not really. React has continued to dominate.

4m1rk•2h ago
Nice job! I've tried dozens of frameworks with various languages, but always return to Django+Tailwind+HTMX+Alpine.
hunvreus•1h ago
High five! Close enough to my stack.
akka47•7m ago
This looks awesome. Thanks a lot!

Type-constrained code generation with language models

https://arxiv.org/abs/2504.09246
61•tough•2h ago•22 comments

Flattening Rust's Learning Curve

https://corrode.dev/blog/flattening-rusts-learning-curve/
44•birdculture•2h ago•16 comments

Your fingers wrinkle the same way every time you're in the water too long

https://www.binghamton.edu/news/story/5547/do-your-fingers-wrinkle-the-same-way-every-time-youre-in-the-water-too-long-new-research-says-yes
9•gnabgib•58m ago•0 comments

Branch Privilege Injection: Exploiting branch predictor race conditions

https://comsec.ethz.ch/research/microarch/branch-privilege-injection/
318•alberto-m•7h ago•126 comments

Starcloud

https://www.ycombinator.com/companies/starcloud
122•wiley1454•4h ago•236 comments

Map of Palaeohispanic Coins and Inscriptions

http://hesperia.ucm.es/consulta_hesperia/mapas.php
8•brendanashworth•21m ago•0 comments

Build real-time knowledge graph for documents with LLM

https://cocoindex.io/blogs/knowledge-graph-for-docs/
63•badmonster•4h ago•10 comments

Failed Soviet Venus lander Kosmos 482 crashes to Earth after 53 years in orbit

https://www.space.com/space-exploration/launches-spacecraft/failed-soviet-venus-lander-kosmos-482-crashes-to-earth-after-53-years-in-orbit
97•taubek•3d ago•61 comments

Google is building its own DeX: First look at Android's Desktop Mode

https://www.androidauthority.com/android-desktop-mode-leak-3550321/
191•logic_node•10h ago•159 comments

Show HN: HelixDB – Open-source vector-graph database for AI applications (Rust)

https://github.com/HelixDB/helix-db/
112•GeorgeCurtis•7h ago•50 comments

PDF to Text, a challenging problem

https://www.marginalia.nu/log/a_119_pdf/
219•ingve•9h ago•123 comments

Multiple security issues in GNU Screen

https://www.openwall.com/lists/oss-security/2025/05/12/1
330•st_goliath•13h ago•202 comments

A tool to verify estimates, II: a flexible proof assistant

https://terrytao.wordpress.com/2025/05/09/a-tool-to-verify-estimates-ii-a-flexible-proof-assistant/
12•jjgreen•3d ago•0 comments

Garbage collection of object storage at scale

https://www.warpstream.com/blog/taking-out-the-trash-garbage-collection-of-object-storage-at-massive-scale
34•ko_pivot•3d ago•6 comments

Launch HN: Miyagi (YC W25) turns YouTube videos into online, interactive courses

156•bestwillcui•11h ago•86 comments

It Awaits Your Experiments

https://www.rifters.com/crawl/?p=11511
124•pavel_lishin•9h ago•34 comments

Cardiac: A CARDboard Illustrative Aid to Computation [pdf]

https://www.cs.drexel.edu/~bls96/museum/CARDIAC_manual.pdf
14•throwaway71271•2h ago•5 comments

Ask HN: How are you acquiring your first hundred users?

466•amanchanda•15h ago•285 comments

How (memory) safe is Zig? (2021)

https://www.scattered-thoughts.net/writing/how-safe-is-zig/
16•vortex_ape•2h ago•13 comments

Y Combinator says Google is a monopolist, no comment about its OpenAI ties

https://techcrunch.com/2025/05/13/y-combinator-says-google-is-a-monopolist-that-has-stunted-the-startup-ecosystem/
104•mastazi•2h ago•25 comments

OpenTelemetry protocol with Apache Arrow

https://opentelemetry.io/blog/2025/otel-arrow-phase-2/
55•tanelpoder•6h ago•13 comments

The world could run on older hardware if software optimization was a priority

https://twitter.com/ID_AA_Carmack/status/1922100771392520710
556•turrini•14h ago•538 comments

I learned Snobol and then wrote a toy Forth

https://ratfactor.com/snobol/
114•ingve•2d ago•30 comments

When graphic design saves lives

https://news.harvard.edu/gazette/story/2025/05/when-graphic-design-saves-lives/
5•gnabgib•3d ago•0 comments

Using obscure graph theory to solve programming languages problems

https://reasonablypolymorphic.com/blog/solving-lcsa/
25•matt_d•4h ago•3 comments

Turritopsis dohrnii: Immortal jellyfish

https://www.nhm.ac.uk/discover/immortal-jellyfish-secret-to-cheating-death.html
28•vinnyglennon•4d ago•6 comments

Membrane: Media Framework for Elixir

https://membrane.stream/
109•lawik•3d ago•35 comments

Insurers launch cover for losses caused by AI chatbot errors

https://www.ft.com/content/1d35759f-f2a9-46c4-904b-4a78ccc027df
106•jmacd•2d ago•41 comments

In a high-stress work environment, prioritize relationships

https://wqtz.bearblog.dev/high-stress-job-relationships/
282•wqtz•11h ago•178 comments

A Taxonomy of Bugs

https://ruby0x1.github.io/machinery_blog_archive/post/a-taxonomy-of-bugs/index.html
42•lissine•9h ago•14 comments