Bits UI
Headless component primitives for Svelte — accessible, unstyled, and composable
Overview
Bits UI has quickly established itself as the go-to headless primitive library in the Svelte ecosystem. Created by Hunter Becton (the same developer behind shadcn-svelte), it provides the accessible foundation that other libraries build upon.
The library takes a strict headless approach: every component handles behavior, keyboard navigation, focus management, and ARIA attributes, but ships with zero visual styling. This makes Bits UI ideal for teams building custom design systems or anyone who wants pixel-perfect control over their UI without fighting against pre-existing styles.
Each component follows WAI-ARIA authoring practices closely. Dialogs trap focus correctly, comboboxes support full keyboard navigation, and tooltips manage timing and positioning properly. This level of accessibility rigor is rare in the Svelte ecosystem and saves significant development time compared to building these patterns from scratch.
With Svelte 5, Bits UI has embraced runes and the new component model fully. The API feels natural and idiomatic — you get fine-grained reactivity and composability without awkward workarounds. The TypeScript support is thorough, with well-typed props and events throughout.
The documentation is clear and practical, with interactive examples for every component. Each primitive includes detailed API references, accessibility notes, and common usage patterns.
The main trade-off is obvious: you need to style everything yourself. For teams that already have a design system or strong CSS skills, this is a feature. For those wanting quick, good-looking defaults, look at shadcn-svelte (which wraps Bits UI with Tailwind styles) or Skeleton instead.
Bits UI is the right choice when you need a rock-solid accessible foundation and want complete creative control over the visual layer.
What's Inside
Strengths
- Excellent WAI-ARIA compliance out of the box
- Completely unstyled so you have full design freedom
- Powers shadcn-svelte, proving production readiness
- First-class Svelte 5 runes support
- Well-documented API with clear examples
Weaknesses
- Requires you to build all styling from scratch
- Smaller ecosystem compared to React headless libraries
- Learning curve for developers new to headless patterns
Best For
Developers building custom design systems who need accessible primitives without opinionated styling
Not Ideal For
Teams wanting ready-to-use styled components with minimal CSS work