CLI
npx comes with Node.js. It downloads the small VinUI CLI, runs it and leaves nothing installed. The CLI has no dependencies.
Commands
| Command | Does |
|---|---|
init | Set up the project: framework, style, accent and folder. Writes vin.json and vin.css. |
add <names…> | Copy components (and the ones they need) into your project. Blocks too: add login-01 writes it to blocks/ and adds the components it uses. |
style <name> | Switch the style. Rewrites vin.css only. |
diff [names…] | Show what changed in VinUI since you added a component. |
list | List the components and blocks. |
init
Asks only what it can't work out. Every answer can be given as a flag instead, which is handy in scripts (-y skips the questions).
npx @vinish/ui init --framework react --style tactile --accent "#0d9488" --radius lg -yThe Create page builds this command for you as you pick a style, accent and the rest.
Frameworks and folders
init reads package.json to pick the framework: Svelte or SvelteKit, then Vue or Nuxt, then React or Next.js. With none of them it sets up plain HTML. --framework overrides it.
| Framework | Files | Default folder |
|---|---|---|
react | .tsx | src/components/vin (or components/vin without src) |
vue | .vue | src/components/vin (or components/vin without src) |
svelte | .svelte, one file per part | src/lib/components/vin in SvelteKit, else src/components/vin |
html | The examples as .html, plus vinui.js when needed | vin |
Choose another folder with --path. Components import each other with relative paths, so any folder works. See Frameworks for how the versions differ.
add
npx @vinish/ui add dialog dropdown-menuEach component brings the ones it uses: add alert-dialog also adds dialog, and in Svelte add card adds card-header.svelte and the other parts.
If you've changed a file, add asks before replacing it (or keeps yours with -y). --overwrite replaces without asking. Mistyped names get a suggestion.
diff
npx @vinish/ui diff buttonLines with - are yours, + are VinUI's. It exits with code 1 when something differs, so you can use it in CI.
vin.json
{
"$schema": "https://vinish.dev/ui/r/vin.schema.json",
"framework": "react",
"style": "tactile",
"accent": "#0d9488",
"path": "src/components/vin",
"css": "src/vin.css",
"components": { "button": "0.1.0" }
}Offline and self-hosting
Components come from https://vinish.dev/ui/r/. Point the CLI at a folder or another server with --registry or the VINUI_REGISTRY environment variable, for example a build of this site.
Customize
Saved in this browser. Style and accent are in the header.