Bits UI
Headless Svelte primitives.
Bits UI is the Svelte answer to Radix: accessible behaviour with no styles attached. It is the primitive layer under shadcn-svelte, which means most Svelte developers use it whether or not they installed it directly.
At a glance
| Install | npm install bits-ui |
| Styling | none, fully agnostic |
| Svelte version | built for Svelte 5 runes |
| Used by | shadcn-svelte |
| MCP server | not published, but every doc page is markdown |
| License | MIT |
Install
npm install bits-ui
What the code looks like
Namespaced components with addressable parts, so styling never fights the library.
<script lang="ts">
import { Dialog } from "bits-ui";
let open = $state(false);
</script>
<Dialog.Root bind:open>
<Dialog.Trigger class="btn">Rename project</Dialog.Trigger>
<Dialog.Portal>
<Dialog.Overlay class="overlay" />
<Dialog.Content class="panel">
<Dialog.Title>Rename project</Dialog.Title>
<Dialog.Description>This cannot be undone.</Dialog.Description>
<Dialog.Close class="btn">Cancel</Dialog.Close>
</Dialog.Content>
</Dialog.Portal>
</Dialog.Root>
Documentation built for agents
Every documentation page is served as clean markdown, with a consolidated file at bits-ui.com/docs/llms.txt. There is no MCP server, but pointing an assistant at those files gets you accurate props without the usual hallucinated API surface.
Choose it if
- You are on Svelte 5 and want behaviour you can style from zero.
- You are building a Svelte design system and want a tested accessibility layer.
Look elsewhere if
- You want something styled today. shadcn-svelte is this library with a design on top.
- You are still on Svelte 4. Check version support before you install.