Skip to content

CLI

npx comes with Node.js. It downloads the small VinUI CLI, runs it and leaves nothing installed. The CLI has no dependencies.

Commands

CommandDoes
initSet 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.
listList 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).

Terminal
npx @vinish/ui init --framework react --style tactile --accent "#0d9488" --radius lg -y

The 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.

FrameworkFilesDefault folder
react.tsxsrc/components/vin (or components/vin without src)
vue.vuesrc/components/vin (or components/vin without src)
svelte.svelte, one file per partsrc/lib/components/vin in SvelteKit, else src/components/vin
htmlThe examples as .html, plus vinui.js when neededvin

Choose another folder with --path. Components import each other with relative paths, so any folder works. See Frameworks for how the versions differ.

add

Terminal
npx @vinish/ui add dialog dropdown-menu

Each 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

Terminal
npx @vinish/ui diff button

Lines with - are yours, + are VinUI's. It exits with code 1 when something differs, so you can use it in CI.

vin.json

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.