Install Nova in a Vue 3 application, configure Tailwind CSS v4 with a Nova theme, register the Vue plugin, and render your first component.
Requirements#
- Vue 3
- ES2022+ build target — the Nova Vue plugin uses top-level
awaitso Stencil custom elements are registered before Vue mounts. In Vite, setbuild: { target: 'es2022' }invite.config.ts.
1. Install packages#
Install the web components core, the base tokens/plugin package, and the Vue wrapper:
npm install @nova-design-system/nova-webcomponents @nova-design-system/nova-base @nova-design-system/nova-vue
Or with Yarn:
yarn add @nova-design-system/nova-webcomponents @nova-design-system/nova-base @nova-design-system/nova-vue @stencil/vue-output-target
- Yarn does not install peer dependencies automatically, so include
@stencil/vue-output-targetwhen using Yarn. - On Elia developer VMs experiencing SSL certificate errors, run
npm config set strict-ssl falseas documented in the Developer Setup guide.
2. Set up Tailwind CSS and themes#
Nova uses Tailwind CSS v4 as its styling layer. The CSS-only Nova plugin maps Nova design tokens to Tailwind utilities and requires no JavaScript config file.
This walkthrough uses Vite + Vue. For Nuxt or other bundlers, follow the Tailwind CSS installation guide and keep the stylesheet imports below.
Install Tailwind CSS and the Vite plugin#
npm install tailwindcss @tailwindcss/vite
Install the Tailwind CSS IntelliSense VS Code extension for autocomplete across Tailwind and Nova design tokens. For Vue TypeScript and IntelliSense support, use the Vue - Official extension.
Configure vite.config.ts#
Add the tailwindcss() plugin and set the build target to es2022:
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
plugins: [vue(), tailwindcss()],
build: {
target: 'es2022',
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
});
Import Tailwind, the Nova plugin, and one theme#
In your main stylesheet (for example src/assets/main.css), import Tailwind, Nova's CSS-only plugin, and exactly one token theme (spark.css or ocean.css):
@import 'tailwindcss';
@import '@nova-design-system/nova-base/theme/plugin.css';
@import '@nova-design-system/nova-base/dist/css/spark.css';
/* Or import ocean.css instead of spark.css. */
Remove any conflicting boilerplate CSS generated by create-vue, and do not import @nova-design-system/nova-base/dist/css/nova-utils.css alongside Tailwind.
Dark mode#
Enable dark mode by adding the dark class to <body> (or another root container). Semantic tokens such as bg-level-00 and text-high adapt automatically.
<body class="dark">
Deprecated JavaScript Tailwind configuration
The previous JavaScript theme and plugin remain available for backward compatibility. Do not combine this setup with theme/plugin.css.
tailwind.config.ts:
import type { Config } from 'tailwindcss';
import { novaTailwindTheme } from '@nova-design-system/nova-base/theme';
export default {
theme: novaTailwindTheme,
} satisfies Config;
src/assets/main.css:
@import 'tailwindcss';
@import '@nova-design-system/nova-base/dist/css/spark.css';
@config '../../tailwind.config.ts';
@plugin '@nova-design-system/nova-base/theme/plugin';
@custom-variant dark (&:where(.dark, .dark *));
3. Register the Nova Vue plugin#
Register NovaComponents in src/main.ts so Nova custom elements are defined before your application mounts:
import './assets/main.css';
import { createApp } from 'vue';
import { NovaComponents } from '@nova-design-system/nova-vue/plugin';
import App from './App.vue';
const app = createApp(App);
app.use(NovaComponents);
app.mount('#app');
4. Add Nova Font Pro#
Nova Font Pro (TT Norms Pro) is a licensed Elia Group asset and is not bundled in @nova-design-system/nova-base. Get the stylesheet URL from the Nova internal wiki or ask the Nova team on Teams.
Import the font stylesheet in src/assets/main.css (recommended):
@import url('contact-us-for-URL/nova-fonts-pro.css');
Or link it in index.html:
<link rel="stylesheet" href="contact-us-for-URL/nova-fonts-pro.css" />
5. Render your first component#
Import components from @nova-design-system/nova-vue, bind values with v-model, and style layouts with Tailwind utilities:
<script setup lang="ts">
import { ref } from 'vue';
import { NvAlert, NvButton, NvFieldtext } from '@nova-design-system/nova-vue';
const name = ref('');
const greeting = ref('');
function greet() {
greeting.value = name.value ? `Hello, ${name.value}.` : 'Hello from Nova.';
}
</script>
<template>
<div class="flex max-w-md flex-col gap-4 p-6">
<NvFieldtext
v-model="name"
label="Name"
placeholder="Enter your name"
/>
<NvButton emphasis="high" @click="greet">
Say hello
</NvButton>
<NvAlert v-if="greeting" feedback="information" :heading="greeting" />
</div>
</template>
Working with slots#
Place default slot content directly inside a component. For named slots, add the slot attribute to the slotted element:
<template>
<NvButton emphasis="medium">
<NvIcon name="download" slot="leading-icon" aria-hidden="true" />
Export report
<NvIcon name="arrow-right" slot="trailing-icon" aria-hidden="true" />
</NvButton>
</template>
Next steps#
- FormsBuild, validate, submit and dynamically grow forms with Nova fields — with live examples in every framework.
- Two-way bindingKeep Nova components and your application state in sync — single props, multiple bindings on one component, complex values, and framework idioms across all five frameworks.
- Typography in codeThe fonts, type styles and utility classes Nova applies to text.
- Get started in FigmaHow designing with Nova works, and where to get the design kits.