# Installation

<script>
  import InstallCommand from "$lib/components/registry/install-command.svelte";
  import { registryConfig } from "$registry/config";
</script>

Install any item from **Design System UI Svelte** with the [shadcn-svelte CLI](https://www.shadcn-svelte.com/docs/cli), passing the item's JSON URL.

Your project must already be set up with [shadcn-svelte](https://www.shadcn-svelte.com/docs/installation).

Start with the [`styles`](/docs/styles) registry item so your project has the design system CSS foundation before adding components.

<InstallCommand
  kind="exec"
  args={`shadcn-svelte@latest add ${registryConfig.homepage}/r/button.json`}
/>

## Add registry connection

By default, shadcn-svelte does not resolve namespaced aliases like `@design-system-ui/button` — you have to pass the full JSON URL every time. To use the shorter alias instead, add a `registries` entry to your project's `components.json`:

```json
{
  "registries": {
    "@design-system-ui": "https://sveltedocs.canceydejean.dev/r/{name}.json"
  }
}
```

Update the URL to your deployed `homepage` from `registry/config.ts`. Once that's set, `npx shadcn-svelte@latest add @design-system-ui/<name>` works in place of the full JSON URL.

This only needs to be done once per project.