Live data from Hacker News

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

news.ycombinator.com

71–79 of 79 posts

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

#71

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.

I also use @apply with Tailwind, makes this a beautiful not spagetti experience.

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

#72

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

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?

Why aren't you just using the built-in dialog element that already handles this?

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

#73

This is exactly what I was wanting to reach for, wanted my chrome extension UI to match my react website. Appreciate your work!

Do send me a link to your extension if you end up using Basecoat: hunvreus@gmail.com

Will do! Will drop you a line when I do.

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

#74
post #67
post #38

Earlier quoted context omitted.

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…

I've been using RiotJS when I need partial component support - wasn't an all-in thing like React ; and I thought HTMX and Alpine are also good for these partial upgrades. Maybe WebComponents are fully supported now? (I can't keep up)

https://caniuse.com/?search=web%20components

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

#75
post #72

Earlier quoted context omitted.

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?

Why aren't you just using the built-in dialog element that already handles this?

is kind of a PITA to style (backdrop, transitions, etc), and doesn't really solve any of the tough problems with dialogs (e.g. locking scrolling).

I tried really hard to use and popover but didn't succeed. Maybe somebody more skilled can make it happen.

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

#76
post #26
post #12

Earlier quoted context omitted.

and then... that solves the issue of a Tailwind dep

If deps are a problem for you, don't use basecoat.

It is a fair ask. But not if you ask a Framework that is based on Tailwind. It's like critisising Windows for not being macOS.

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

#78
post #77

I’m moving from react to wordpress and I could not be happier that I discovered this today I’m so pumped to try this out!!!

Very happy to hear that some people find it useful.

Please do let me know if things aren't working as expected, I want to make this a great alternative to anything else out there: https://github.com/hunvreus/basecoat/issues

Be brutally honest.

Post reply on HN