217 free animated components and backgrounds for Svelte.
Tune them yourself, or hand them to your agent.
Documentation · Installation · MCP · Browse · Changelog
Svelte Bits is the official Svelte port of React Bits. Every component is a single Svelte 5 file written in TypeScript and styled with Tailwind, so there is one file to copy and nothing else to wire up. Ports keep the original dependencies, shaders, physics and props.
| Category | Count | What you'll find |
|---|---|---|
| Text Animations | 33 | Split text, typewriters, rotating words and scroll reveals |
| Animations | 38 | Cursor effects, hover interactions, borders and image effects |
| Components | 48 | Cards, navigation, carousels and galleries |
| Micro | 34 | Buttons, toggles, indicators and other small interface details |
| Backgrounds | 64 | Gradients, particles, grids and shader effects for whole sections |
The docs site gives every component a live demo with controls, and many of them come with presets to start from. You can search the whole library, browse it by category, save favorites, and switch between dark and light mode.
Add any component with the shadcn CLI, using the component's name in kebab case:
npx shadcn@latest add https://sveltebits.xyz/r/split-text.jsonOr with jsrepo:
npx jsrepo add https://sveltebits.xyz/r/split-text.jsonOn pnpm, Yarn or Bun, replace npx with pnpm dlx, yarn dlx or bunx --bun.
Prefer to copy by hand? Open a component's Code tab, paste the file into your project (for example src/lib/components/SplitText.svelte) and install the dependencies it lists. The installation guide covers both.
<script lang="ts">
import SplitText from '$lib/components/SplitText.svelte';
</script>
<SplitText text="Hello, you!" delay={100} duration={0.6} />Svelte Bits works with the shadcn MCP server, so Claude Code, Cursor, Codex, VS Code and Antigravity can find and add components for you. Add the registry to your components.json:
{
"registries": {
"@sveltebits": "https://sveltebits.xyz/r/{name}.json"
}
}Then connect your client, for example npx shadcn@latest mcp init --client claude, and ask for what you need. See the MCP guide for every client.
npm install
npm run devnpm run dev starts the site and rebuilds the component registry in static/r/ when components change. Other scripts:
| Command | What it does |
|---|---|
npm run registry:build |
Builds the registry once with jsrepo |
npm run build |
Builds the production site |
npm run check |
Runs Svelte diagnostics |
The site uses @sveltejs/adapter-cloudflare in svelte.config.js and a Worker-style wrangler.jsonc. Build with npm run build, then deploy with npx wrangler deploy.
The build output goes to .svelte-kit/cloudflare, with the Worker entry at .svelte-kit/cloudflare/_worker.js and static assets served from the same directory through the ASSETS binding. When deploying through the Cloudflare dashboard, use:
| Setting | Value |
|---|---|
| Build command | npm run build |
| Build output directory | .svelte-kit/cloudflare |
| Node.js version | 20 or newer |
Contributing. Ideas and fixes are welcome. Browse the open issues or open a new one before sending a pull request. Component ports must match the React Bits original as closely as possible, including dependencies, shaders, spring configs, props and behavior.
Other versions. Svelte Bits is a port of React Bits, which is also available for Vue.
React Bits, and so Svelte Bits, occasionally draws inspiration from publicly available code examples. These are rewritten as full-fledged, customizable components. If you recognize your work, open an issue to request credit.
MIT + Commons Clause, free for personal and commercial use. Created and maintained by David Haz.