The UI kit is the 62 components the preview renders, installed into the React app you already have, painted by your theme. One command writes them, sets up what the app lacks, installs what they import, and shows them in a /design-system section. Run it again to pull updates. DS source supports React apps only for now.
How to use it
In your app's folder:
npx designsource addIt needs React 19 and TypeScript. It asks Add which components? (All or Pick some…), then for the project token (copied from the Export dialog), then names every step as it runs:
Adding theme… ✓
Adding 62 components… ✓
Adding the /design-system section… ✓
Installing libraries… ✓
Your design system: /design-systemThe Export dialog also offers npx designsource first, the setup command that signs you in, picks this design system, adds the kit and connects your coding apps, with no token to copy.
From a coding agent. Copy Prompt for your coding agent from the Export dialog and paste it into the agent working in your app. It has the agent check package.json and stop if the app is not React, run npx designsource add --yes, ask before --force, and restyle the app with the kit components rather than copying values by hand. The prompt holds no token. The agent's add finds one in either of two safe ways:
- You ran
npx designsourceornpx designsource connectin a terminal in this folder once, which saves the token or a link for the folder. DS_SYNC_TOKENis set in the shell profile or CI secret store the agent runs from.
With neither, add stops and the agent asks you to run npx designsource in a terminal here. Never paste the token into a chat, a prompt or a command; see For coding agents.
Then import from @/components/ui/button (or whatever alias your components.json names) as you would any shadcn component. The flags, reruns and every edge are on the add page.
How it works
The theme is the shadcn theme stylesheet built from your tokens, placed between designsource:theme markers in the app's global stylesheet, with Google font imports above. In a shadcn app it replaces the :root, .dark and @theme inline blocks shadcn wrote and keeps your own variables after it; a rule of yours that still sets a theme variable wins, and the command says so.
The components are the kit's own source files, written under the app's components/ui with the cn helper in lib/utils.ts, each stamped on its first line so a rerun can tell a file you edited (kept, and named) from one it can refresh. Their responsive classes query a container named stage, which the theme makes <html>, so a dialog's footer stacks by the window, not by a phone-sized rule.
Setup adds what is missing: Tailwind v4, the @/ alias, components.json. An app not on Tailwind gets no page-wide reset, only the theme, the utilities and a reset scoped to the kit, so your screens look as they did.
A gradient: each surface a project's gradient paints gets its own variable in the theme, --button-gradient, --badge-gradient, --card-gradient, --cta-band-gradient or --hero-gradient. The default button and badge, the card, the call-to-action band and the hero lay it over their solid fill as a background image, and a component you give a fill of your own (bg-muted on a card) drops it. A project without one paints every solid fill exactly as before.
Libraries are installed only for the components written, with the app's own package manager, keeping your version at the same major.
Updates are a rerun: the theme and every stamped component refresh, edits are kept, and a component the kit gained is added when the section is on disk.
What can go wrong
The UI kit needs React 19 — this app is on React 18.: the kit passes refs as props, which React 18 drops silently; upgrade the app to React 19 first.- Vue, Svelte, Angular and plain CSS are not supported yet; see React only for now.
Exports need Pro: the project owner's account is on Free.- A library at another major is skipped with the components that need it, named in one line.
Related
add: every flag.- Pulling screens into an app: the screens you made, as code beside the kit.
- The /design-system section.
- Components and slots.