Installation
Install vectis-ui in your Vue 3 project and import its global stylesheet.
With Vite
Install vectis-ui and its peer dependency, vue.
pnpm add vectis-ui vue
Import vectis-ui/styles.css once in main.ts. It includes the CSS reset, design tokens and shared styles.
// main.ts import 'vectis-ui/styles.css'
With Nuxt 3 or 4
Install vectis-ui. Nuxt already provides Vue.
pnpm add vectis-ui
Add the global stylesheet to the css array and vectis-ui to build.transpile in nuxt.config.ts.
// nuxt.config.ts
export default defineNuxtConfig({
css: ['vectis-ui/styles.css'],
build: { transpile: ['vectis-ui'] },
})Server-side rendering requires build.transpile. Without it, the production server loads the package with Node, which cannot import the component CSS files, and every page fails.
Component CSS
Component styles load with their imports. You do not need to import a separate stylesheet for each component.
For server-side rendering with Vite outside Nuxt, add vectis-ui to ssr.noExternal so Vite bundles these CSS imports.