An honest comparison. Lux isn't trying to do everything — it does the SaaS UI essentials in a fraction of the size.
| Library | Gzipped | Notes |
|---|---|---|
| Lux | 12KB | Complete CSS + JS for 40+ components |
| Bootstrap 5 | ~30KB | CSS + JS, needs Popper.js |
| HeroUI | ~85KB | React + Tailwind required |
| shadcn/ui | 200KB+ | Per-component install, adds up fast |
| MUI | ~90KB | Emotion + 30+ deps |
| Chakra UI | ~65KB | Emotion + framer-motion |
| Feature | Lux | shadcn | HeroUI | MUI | Bootstrap |
|---|---|---|---|---|---|
| Zero dependencies | ✓ | CLI | ✗ | ✗ | Popper |
| No build step | ✓ | ✗ | ✗ | ✗ | ✓ |
| Framework-free | ✓ | React | React | React | ✓ |
| Native dark mode | light-dark() | class | class | theme | attr |
| Semantic HTML | ✓ | div | div | div | partial |
| CDN-ready | 2 lines | ✗ | ✗ | ✗ | ✓ |
| Accessibility | AAA | AAA | AA+ | AA | AA |
| Component theming | CSS vars | CSS vars | Theme | Theme | Sass |
| Command palette | ✓ | cmdk pkg | ✗ | ✗ | ✗ |
| SSR support | ✓ | ✓ | ✓ | complex | ✓ |
| Tree-shakable | Per-file | ✓ | ✓ | ✓ | module |
Coming from another library? Here's the rough mental model:
Replace JSX wrappers with raw HTML + data-variant. Drop your components/ui/* folder. ~80% size reduction.
Replace 15-class strings with semantic class names or pure HTML. Keep Tailwind for layout if you want — Lux doesn't conflict.
Class names are different but the mental model is similar. Lux is half the size with native dark mode and modern aesthetics.