---
title: Run Svelte Bits locally
description: Clone Svelte Bits, start the docs site, and find where a component and its demo live.
url: https://sveltebits.thally.app/quickstart
---

# Run Svelte Bits locally

Clone Svelte Bits, start the docs site, and find where a component and its demo live.

By the end of this page you'll have the Svelte Bits docs site running on your
machine, and you'll know where a component's code and demo live. That's the setup
every port starts from. It takes about 10 minutes.

## Before you begin

You need:

- **Node.js 20 or later.** This guide was tested with Node.js 22.
- **Git** and a **GitHub account**.
- A **fork** of [DavidHDev/svelte-bits](https://github.com/DavidHDev/svelte-bits).
  Click **Fork** on the repository page.

#### Clone your fork

    ```bash
    git clone https://github.com/<your-username>/svelte-bits.git
    cd svelte-bits
    ```

#### Install dependencies

    ```bash
    npm install
    ```

#### Start the dev server

    ```bash
    npm run dev
    ```

    This starts two processes side by side, and you'll see both in the output:

    - **`[registry]`** runs `jsrepo build --watch`. It scans every component and
      regenerates the install files in `static/r/`. You should see a line like
      `Created 2 outputs … with 164 items`.
    - **`[app]`** runs the Vite dev server for the docs site, at
      `http://localhost:5173/`.

> **Warning:**
    On the first run, the `[app]` output may show a long list of red
    `ENOENT … [plugin vite:dep-scan]` errors. **These are harmless.** Vite's
    dependency scanner mistakes the example code shown on demo pages for real
    imports. The site still works.

#### Open a component

    Go to [http://localhost:5173/animations/cursor-grid](http://localhost:5173/animations/cursor-grid)
    and move your cursor over the preview. Grid cells should light up around it.

    Every component page follows the pattern `/<category>/<component-name>`.

#### Find its files

    Each component has two files you'll work with:

    | What | Where |
    | --- | --- |
    | The component | `src/lib/components/library/Animations/CursorGrid/CursorGrid.svelte` |
    | Its demo page | `src/lib/components/docs/pages/CursorGridDemo.svelte` |

    Open the demo file, change the `cellSize` default in its `D` object from `70`
    to `40`, and save. The preview updates with smaller cells. Undo the change.

## Check it worked

- `http://localhost:5173/` shows the Svelte Bits docs, with 164 components in the sidebar filter.
- The Cursor Grid preview reacts to your cursor.
- Editing a demo file updates the page without a restart.

## If something's wrong

#### Red ENOENT errors mentioning vite:dep-scan

		Expected on the first run, see the warning in step 3. If the site loads, you
		can ignore them.

#### The page is blank or the port is different

		Another app may already be using port 5173. Vite then picks the next free
		port; check the `Local:` line in the `[app]` output for the real address.

#### `npm run dev` stops with “Registry metadata is out of sync”

		The registry build found a component that isn't registered in
		`src/lib/constants/categories.ts`, or the other way round. On a fresh clone
		this shouldn't happen; if it does after your own changes, see
		[Troubleshooting](/guides/port-a-component#troubleshooting) in the porting
		guide.

## Next step

#### [Port a React Bits component](/guides/port-a-component)

		Turn a React Bits component into a Svelte Bits one, end to end.