Installation
Install editable SUI source with the shadcn CLI.
Install SUI source through its shadcn registry. Components, styles, and dependencies integrate with your application configuration.
Install through the registry
Prepare the consuming application
Use React 19, Tailwind CSS 4, and a shadcn project configured for Base UI. In an existing application that has not initialized shadcn, run:
pnpm dlx shadcn@latest init --base baseUse the public GitHub registry directly with draco-china/sui/<item> addresses. No @sui namespace configuration is required.
Search, inspect, and install
Run the following commands from the consuming application directory:
pnpm dlx shadcn@latest search draco-china/sui -q button
pnpm dlx shadcn@latest view draco-china/sui/button
pnpm dlx shadcn@latest add draco-china/sui/button draco-china/sui/code-editorInstall the business blocks by their registry names:
pnpm dlx shadcn@latest add draco-china/sui/delete-resource draco-china/sui/tanstack-formTo install the complete collection, including all components, blocks, layouts, viewers, chat and charts:
pnpm dlx shadcn@latest add draco-china/sui/suiEach manifest includes the item's local component dependencies, hooks, helpers, types, package dependencies, and SUI CSS and theme tokens. The CLI installs source into the directories configured by your aliases and merges styles into the configured Tailwind CSS file. Standalone entries draco-china/sui/sui-style and draco-china/sui/sui-theme provide the shared styles and theme helpers.
Review the generated files and CSS when adding SUI to an application that already has components with the same names or custom theme values. Preview an update before applying it:
pnpm dlx shadcn@latest add draco-china/sui/button --dry-run
pnpm dlx shadcn@latest add draco-china/sui/button --diffCode Editor uses locally bundled Monaco workers and requires a Vite-compatible ?worker loader. Keep the installed worker.d.ts in your TypeScript include paths. This also applies when installing the complete collection.
Blocks default to English. Pass labels from your application's locale configuration to customize their visible text; see the Delete Resource and TanStack Form references.
Import installed source
With the default shadcn aliases, import from your own application:
import { Button } from "@/components/ui/button";
export function SaveButton() {
return <Button>Save changes</Button>;
}Use the actual aliases in your components.json if they differ. Examples throughout this reference use workspace imports such as @workspace/ui/components/button. For a registry installation, replace @workspace/ui/components/* with your ui alias; @workspace/ui/blocks/*, layouts/*, viewers/*, chat/* and charts/* with your components alias followed by the same folder; and hook or helper imports with your hooks or lib alias. For example, the default aliases use @/components/ui/data-table, @/components/blocks/tanstack-form, @/components/charts/bar-chart, and @/hooks/use-mobile. The CLI adapts imports inside the installed files automatically.
Optional: keep using the namespace
Existing Raw installation URLs and the @sui namespace remain available. To use short addresses such as @sui/button:
Merge this entry into the application's existing components.json. Preserve its CSS path and aliases:
{
"registries": {
"@sui": "https://raw.githubusercontent.com/draco-china/sui/main/registry/r/{name}.json"
}
}The catalog URL is https://raw.githubusercontent.com/draco-china/sui/main/registry/r/registry.json. Individual manifests use the same directory.
pnpm dlx shadcn@latest add @sui/buttonConnect the shadcn MCP server
The MCP guide covers client configuration, project working directories, example requests, and troubleshooting. MCP shares this application's @sui registry configuration. For API documentation and complete example text, use LLMs.
See Theming for CSS tokens and Compatibility for runtime requirements.
SUI includes only the default light/dark palette with ordinary components. Other palettes are optional: install, for example, draco-china/sui/theme-lime, or import @workspace/ui/themes/lime.css when using the workspace package. See Theming.