Skip to content

Manual Installation

Step-by-step manual setup, components.json configuration, and custom registry reference.

This guide covers setting up Space UI manually—from configuring components.json for registry resolution to zero-CLI copy-pasting for custom stacks and monorepos.

Full Code Ownership: Space UI components are open and unbundled. You have complete freedom to customize, tweak styles, and adapt them directly in your codebase.

Install Core Dependencies

Install Base UI, Motion, and class utility dependencies:

Bash

Configure components.json

Create or update components.json at the root of your project to connect the @spaceui registry namespace:

components.json

Add Class Merging Utility (lib/utils.ts)

Create lib/utils.ts to provide the cn() helper used throughout all Space UI primitives:

lib/utils.ts

Configure Theme & CSS Variables (globals.css)

Add the standard design tokens to your global CSS stylesheet (app/globals.css or src/index.css):

globals.css

Add Components

Install via shadcn CLI or copy the primitive code directly:

Bash

(Or click the Code tab on any component documentation page and copy the source into your components/ui/ directory).

Render and Verify

Import your component and verify its behavior:

app/page.tsx

components.json Schema Reference


Multi-Registry Namespaces

With the @spaceui registry configured, you can install any component with:

Code

The CLI queries https://www.spaceui.one/r/{name}.json, resolves the component code and sub-dependencies, rewrites imports according to your local aliases, and places files into your components/ui/ directory.


Custom Path Aliases & Monorepos

For monorepo structures (e.g. Turborepo, Nx) or custom folder hierarchies, adjust the aliases block:

components.json