News for hackers. Stuff that matters.
Re:Shadcn: Components that you can copy-paste into your apps by ch33zer on Saturday January 13, 2024 @01:43AM (#38977852)
These look beautiful, but the react requirement makes it harder for me to want to use them.

As someone whos just built terrible frontends using plain CSS + JS + HTML, what's the currently preferred method for building simple sites that look good? I'm looking for the sweet spot between:

* Gentle learning curve * Powerful * Looks good

I'm currently using Bootstrap because it's what was popular a decade ago the last time I built UIs, but there must have been some advancement since then

Re:Shadcn: Components that you can copy-paste into your apps by pabe on Saturday January 13, 2024 @04:14AM (#38978347)
I paid for TailwindUI and Flowbite but I actually like DaisyUI the most. They're all TailwindCSS based. The difference is that DaisyUI is more like Bootstrap in that they create complete CSS components you can apply using a single class. Flowbite could be higher quality for the money, e.g. there is a "Navbar with multi-level dropdown" that doesn't really work that well on mobile. They're also using JS for dropdowns where DaisyUI is relying on pure CSS.
Re:Shadcn: Components that you can copy-paste into your apps by ahmedfromtunis on Saturday January 13, 2024 @03:02AM (#38978102)
I still just use Bootstrap and vanilla JS for all my projects. I also write CSS manually to adjust and fine tune the design.

This allows me to have total control over every aspect of the project, while ensuring top notch performance.

Native web components are also a very powerful tool if you take the time to understand how they work properly.

I looked into updating my setup many times over the years, but the only advancements I feel are concrete seem to come from new native html APIs and CSS capabilities.

For everything else, the introduced convenience does not justify the huge overhead in terms of complexity, performance loss and added fragility.

Re:Shadcn: Components that you can copy-paste into your apps by thatcherthorn on Saturday January 13, 2024 @03:43AM (#38978241)
As a backend developer who previously used bootstrap, it has been a delight to discover tailwind: https://tailwindcss.com/
Re:Shadcn: Components that you can copy-paste into your apps by kugelblitz on Saturday January 13, 2024 @03:44AM (#38978246)
I also still use Bootstrap. After adjusting it via the .scss files, it looks custom. Tailwind keeps popping up on my radar, but Bootstrap's utility classes are good enough for now.

I even exchanged the bit of Vue.js functionality with htmx.

And I use a bit of Alpine.js and vanilla JavaScript here and there, but it's very minimal.

Re:Shadcn: Components that you can copy-paste into your apps by nox101 on Saturday January 13, 2024 @02:19AM (#38977966)
Is Lit and some of the libraries made with it what you're looking for? Like maybe

https://bui.js.org/

Re:Shadcn: Components that you can copy-paste into your apps by vidarh on Saturday January 13, 2024 @04:15AM (#38978350)
The two seconds "Loading" on an otherwise blanks screen I got (on mobile, but still) was not convincing...
Re:Shadcn: Components that you can copy-paste into your apps by mock-possum on Saturday January 13, 2024 @04:27AM (#38978406)
Prefer native web components buuuuut honestly Lit just makes web components quicker + easier. Love me some Lit.
Re:Shadcn: Components that you can copy-paste into your apps by eterps on Saturday January 13, 2024 @02:32AM (#38978008)
For simple sites: https://v2.picocss.com
Re:Shadcn: Components that you can copy-paste into your apps by tipiirai on Saturday January 13, 2024 @02:10AM (#38977932)
Nue with a content-first approach might work:

https://nuejs.org/

No templates yet so the "looking good" part requires CSS skills.

Re:Shadcn: Components that you can copy-paste into your apps by threatofrain on Saturday January 13, 2024 @03:31AM (#38978200)
Astro is real fun and can deliver ultra-performance. https://astro.build/
Re:Shadcn: Components that you can copy-paste into your apps by vijaybritto on Saturday January 13, 2024 @03:36AM (#38978212)
He's asking for a component library not a framework like astro
Re:Shadcn: Components that you can copy-paste into your apps by tipiirai on Saturday January 13, 2024 @04:41AM (#38978470)
To be exact @ch33zer is asking for "a preferred method for building simple sites that look good"
Re:Shadcn: Components that you can copy-paste into your apps by spaceman_2020 on Saturday January 13, 2024 @03:18AM (#38978150)
Honestly, once you get the hang of tailwind, its hard to go back to regular CSS. Takes barely a day to get comfortable.
Re:Shadcn: Components that you can copy-paste into your apps by advanderveer on Saturday January 13, 2024 @02:17AM (#38977957)
Maybe something like: Flowbite, or Tailwind UI? Both mostly paid but I think the value is pretty good for what you get.
Re:Shadcn: Components that you can copy-paste into your apps by quickthrower2 on Saturday January 13, 2024 @03:45AM (#38978248)
Yet another suggestion

https://daisyui.com/

Re:Shadcn: Components that you can copy-paste into your apps by boundlessdreamz on Saturday January 13, 2024 @05:23AM (#38978656)
Depending on your stack, there are quite a few options.

Laravel:

- https://filamentphp.com/

- https://bladewindui.com/

Rails:

- https://zestui.com/ (Disclaimer: my project)

Alpine+Tailwind:

- https://devdojo.com/pines

- https://sailboatui.com/ (minimal alpine)

WebComponents:

- https://shoelace.style/

Others:

- https://daisyui.com/

- https://flowbite.com/

- https://preline.co/index.html

Re:Shadcn: Components that you can copy-paste into your apps by hit8run on Saturday January 13, 2024 @09:06AM (#38980010)
Shadcn for Rails (MIT License):

https://shadcn.rails-components.com

Re:Shadcn: Components that you can copy-paste into your apps by srevinsaju on Sunday January 14, 2024 @07:48AM (#38989955)
And Shadcn for Svelte: https://www.shadcn-svelte.com/
Re:Shadcn: Components that you can copy-paste into your apps by BrandoElFollito on Saturday January 13, 2024 @06:34AM (#38979066)
I use Quasar and Vue. This is my hammer for all nails, no matter the size of the nail.

I only write amateur apps for personal use (or a small number of people), on good networks etc. So even when I need to say "hello" centered on the screen I would fire up a full app environment.

I do this because I can reuse my knowledge in all situations.

Because I am curious and like to break what I did to the despair of the users, I recently started to use Vue + Vite + TailwindCSS + DaisyUI as a replacement. Again - a single hammer for everything, nail or not nail.

Re:Shadcn: Components that you can copy-paste into your apps by KronisLV on Saturday January 13, 2024 @07:54AM (#38979528)
> I use Quasar and Vue. This is my hammer for all nails, no matter the size of the nail.

Vue is great, especially with their Composition API (https://vuejs.org/guide/extras/composition-api-faq.html#why-...) and something like Pinia for state management, without the hassles of something like Redux: https://pinia.vuejs.org/

As for components, I really liked the idea behind PrimeVue/PrimeReact/PrimeNG/PrimeFaces (https://www.primefaces.org/) because I'm not aware of any other attempts of creating components that actually work similarly across different frameworks/libraries and it's really good because your skills carry over pretty well if you ever find yourself exploring a slightly different stack.

For what it's worth, the components also work decently (there's a whole list https://primevue.org/autocomplete/) and look okay (with various themes available, https://primevue.org/theming/), plus you can get examples (https://blocks.primevue.org/). Oh yeah, they also have their CSS utilities (a bit like Tailwind, https://primeflex.org/installation) and icons (https://primevue.org/icons).

I actually look forwards to the day where most of these concerns are less of an artisanal craft but rather a set of boring and well known things that just work well for quickly putting together a CRUD or whatever you need.

That said, I also explored VueRequest for handling network requests a bit more easily (https://www.attojs.org/guide/gettingStarted.html) and VueUse for stuff like LocalStorage (https://vueuse.org/guide/) and while it doesn't feel like I'm building a crappy alternative to Vuex and the complexity is reasonably manageable and the usability present, occasionally it all still feels a bit annoying to deal with - reactivity, ways to shuffle around data that I get from the back end, props, various bugs... so it's not all good, but still less complex than some of the things I've seen with React or Angular.

Re:Shadcn: Components that you can copy-paste into your apps by BrandoElFollito on Saturday January 13, 2024 @04:44PM (#38984896)
Thanks for pointing out Primefaces, I did not know it. It looks really good - I am just not sure about their licensing and price (I developed apps for personal use). The components look great and apparently one can also use TailwondCSS natively.

VueRequest also looks nice - I use fetch to get the data but this library avoids the boilerplate.

Thansk for these ideas - I will jump once again in something new :)

Re:Shadcn: Components that you can copy-paste into your apps by ramon156 on Saturday January 13, 2024 @07:01AM (#38979204)
Daisyui if you like tailwind Shoelace seems very good aswell, it was on HN the other day and made by a senior at Microsoft.
Re:Shadcn: Components that you can copy-paste into your apps by Psychotherapist on Saturday January 13, 2024 @08:13AM (#38979626)
There have been plenty of suggestions here already, but here's one I prefer personally: https://fomantic-ui.com/ (fork of Semantic-UI)

Like other CSS-Frameworks, this can be used by adding the CDN Links for CSS/JS to the Page, and then using the components/classes. I have tried countless other frameworks, but this one really stood out to me due to the semantic class writing, like class="compact secondary button" (a smaller, secondary theme color (black by default), button)

Of course, good looks are subjective, but I like the look a lot.

Re:Shadcn: Components that you can copy-paste into your apps by nnurmanov on Saturday January 13, 2024 @08:53AM (#38979859)
I am currently supporting legacy bootstrap & jquery web app and planning to move to something modern. I am waiting for Oracle to complete migration to preact to give their framework another try. But we have shortlisted react.
Re:Shadcn: Components that you can copy-paste into your apps by replwoacause on Saturday January 13, 2024 @10:49PM (#38987253)
I also dislike the React requirement for so many UI frameworks. Preline UI is a Tailwind CSS framework although it doesn’t work with CDN, you still need to build Tailwind. I too am looking for easy ways to build nice UIs without too much overhead.