jlds add
Downloads one or more components from the registry into your project.
bash
jlds add button
jlds add button input badge # multiple at onceWhat it does, per component
- Fetches
components/<name>/meta.jsonfrom the registry and selects the file list for your configuredframework(meta.files.reactormeta.files.vue). - Fetches any files listed in
meta.files.shared(e.g.<name>.variants.ts) and inlines them into the framework files that import them — see shared files. - Writes each framework file (e.g.
button.tsx,index.ts/Button.vue,index.ts) into<paths.components>/<name>/. - Fetches
css/<name>.cssfrom the registry and writes it as<name>.cssalongside the component — this is the single source of truth for that component's.jl-*classes, for every framework. - Installs any
dependencies/devDependenciesdeclared inmeta.jsonusing your detected package manager.
Output layout
For jlds add button with the default paths.components (src/components/ui):
src/components/ui/button/
├── button.css # from registry/css/button.css
├── button.tsx # (or Button.vue for the Vue framework)
└── index.tsDependency installation
The package manager is detected from lockfiles in the project root, in this order:
| Lockfile | Package manager |
|---|---|
pnpm-lock.yaml | pnpm |
yarn.lock | yarn |
bun.lock / bun.lockb | bun |
| (none of the above) | npm |
Dependencies are installed with <pm> add <deps...> (<pm> install <deps...> for npm), and dev dependencies with the -D flag. If the install command fails, jlds add reports the exact command to run manually.
The button component currently declares no dependencies.