Kivu UI: React components where your Tailwind classes always win
I built a React component library that doesn't fight Tailwind.
Component styles live in u/layer components, so any className you pass overrides them.
No tailwind-merge, no !important.
- Zero runtime dependencies
- Plain CSS variables, no CSS-in-JS
- Accessible (keyboard navigation, ARIA, native <dialog>)
- 40+ components, React 18 and 19, TypeScript
npm install kivu-ui
0
Upvotes
3
u/Honey-Entire 6d ago
AI slop all the way down. What does this do that the hundreds of other TW react component libraries don’t do? You’re post reads like every other one, Claude
1
u/leoniebuilds 5d ago
the layer approach is neat, but one gotcha i'd test: cascade layer order is set by whichever u/layer statement the browser sees first. if the library css gets imported before tailwind's own layer declaration (theme, base, components, utilities), your components layer can end up ranked below or above in ways you don't expect, and in a bundler setup that import order isn't always obvious. worth a note in the docs about where to import it. also does it work with tailwind v3 projects, where the utilities aren't in a native layer?
1
u/TheRNGuy 3d ago edited 3d ago
Still, add class same as component name but with zero rules, for userstyle authors.
Tailwind is not very good for them.
Also, reason why Tailwind loses is because it's using
@layer. You fix CSS, not React components. But I think it should lose to custom css.If you don't want it to lose… then use only Tailwind (still, see my opinion about custom userstyle authors)