It’s actually very useful. All these negative comments have the hallmarks of people who don’t generally use it. I can tell because the criticisms stem from a lack of familiarity, missing the point.
It affords a lot of consistency, is relatively easy to understand (once you’re familiar with the convention), and theming allows you to modify all the colors and sizing in one file rather than modifying a lot of CSS
I think the worst that can be said about it is that it is unnecessary, but I cannot see a true downside to using it besides personal preference. It gets the job done efficiently and correctly and that’s what’s important at the end of the day
I’ve not used it in anger but the principle just seems like inline-styles with extra steps. However I’ve also had to change something in a large project that had a lot of dedicated classes with specific and shared styles and trying to sort that out without breaking stuff was a massive pain.
At first it seems nice…I played with it for a few hours in an established project and didn’t mind. But the I thought about using it from scratch and I’m just baffled anyone does. It’s like if CSS was slightly more abbreviated but you couldn’t use classes so every style has to be specified on every component.
shadcn is the primary one for react at least. they’ve done a great job filling the space where you’re trying to build up a design system but don’t want to start from scratch, but they’re great if you just want prebuilt components too
all the components build on something else like radix, and are pretty simple themselves. normally just the radix component with styles. Installing a component just copypastes the source into your project at configured locations.
if you’ve ever fought against something like mui to get it to fit design changes or change specific behavior, shadcn is great. at some point the extension points of a library aren’t enough, but if you own all the code that’ll never be a problem.
I don’t use react, but needed a decently looking frontend complement library that didn’t look dated, and found basecoat, which is shadcn but without react to be really neat.
instead of using classes you just use whatever your ui library provides for reuse. stick a classname string in a variable and you have a class. use a component and it just contains all its styles.
unless you mean that if you look in the inspector you see a mess of classnames. I don’t have a solution there
Having never used it before, is it that bad?
It’s a nicer syntax for inline styles.
If you want to use inline styles everywhere, it’s great.
It’s much more than just inline styles. It’s also design constants (e.g. color palettes, sizing etc.) and utilities (e.g.
ring
).It’s actually very useful. All these negative comments have the hallmarks of people who don’t generally use it. I can tell because the criticisms stem from a lack of familiarity, missing the point.
No, it is not that bad. It’s actually very nice.
It affords a lot of consistency, is relatively easy to understand (once you’re familiar with the convention), and theming allows you to modify all the colors and sizing in one file rather than modifying a lot of CSS
I think the worst that can be said about it is that it is unnecessary, but I cannot see a true downside to using it besides personal preference. It gets the job done efficiently and correctly and that’s what’s important at the end of the day
I’ve not used it in anger but the principle just seems like inline-styles with extra steps. However I’ve also had to change something in a large project that had a lot of dedicated classes with specific and shared styles and trying to sort that out without breaking stuff was a massive pain.
At first it seems nice…I played with it for a few hours in an established project and didn’t mind. But the I thought about using it from scratch and I’m just baffled anyone does. It’s like if CSS was slightly more abbreviated but you couldn’t use classes so every style has to be specified on every component.
A lot of ui frameworks are based on tailwind and allow you to customize the components with more tailwind. It’s really a win because:
Fair enough. What ui framework(s?) on tailwind do you like?
shadcn is the primary one for react at least. they’ve done a great job filling the space where you’re trying to build up a design system but don’t want to start from scratch, but they’re great if you just want prebuilt components too
all the components build on something else like radix, and are pretty simple themselves. normally just the radix component with styles. Installing a component just copypastes the source into your project at configured locations.
if you’ve ever fought against something like mui to get it to fit design changes or change specific behavior, shadcn is great. at some point the extension points of a library aren’t enough, but if you own all the code that’ll never be a problem.
I don’t use react, but needed a decently looking frontend complement library that didn’t look dated, and found basecoat, which is shadcn but without react to be really neat.
Might be interesting for the htmx crowd here.
Oh wow, a framework that needs a framework.
You can still use classes if you want to…
Yes but it’s also expressly discouraged in the documentation so…
instead of using classes you just use whatever your ui library provides for reuse. stick a classname string in a variable and you have a class. use a component and it just contains all its styles.
unless you mean that if you look in the inspector you see a mess of classnames. I don’t have a solution there
yea it’s redundant as hell if not combined with UI libraries that extend it like shadcn / daisyui