This is a port of Radix UI for Svelte.
This is not a 1:1 re-implementation of Radix UI. The goal is to provide a similar API and experience, but with a few differences:
- Two-way binding is used instead of event handlers.
- No
asChild
prop (for now).
Install the package:
npm install radix-svelte
# or yarn, pnpm, etc.
Import the components you need:
<script>
import { Toggle } from 'radix-svelte';
let pressed = false;
</script>
<Toggle.Root bind:pressed>
{pressed ? 'Pressed' : 'Not pressed'}
</Toggle.Root>
You can check the planned features and bugs in the issues tab
Check out our contributing guide