Install Nova in a React application, configure Tailwind CSS v4 with a Nova theme, and render your first component.
Next.js requires dedicated Server and Client Component import paths. Follow Next.js Integration for App Router setup.
1. Install packages#
Install the web components core, the base tokens/plugin package, and the React wrapper:
npm install @nova-design-system/nova-webcomponents @nova-design-system/nova-base @nova-design-system/nova-react
Or with Yarn:
yarn add @nova-design-system/nova-webcomponents @nova-design-system/nova-base @nova-design-system/nova-react @stencil/react-output-target
- Yarn does not install peer dependencies automatically, so include
@stencil/react-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 + React. For other bundlers, follow the Tailwind CSS installation guide and keep the stylesheet imports in step 3 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.
Add the plugin to vite.config.ts#
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
plugins: [react(), tailwindcss()],
});
Import Tailwind, the Nova plugin, and one theme#
In your global stylesheet (for example src/index.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. */
Do not combine theme/plugin.css with @nova-design-system/nova-base/dist/css/nova-utils.css — Tailwind generates the utilities you use and avoids shipping redundant CSS.
Import the stylesheet from your application entry point (src/main.tsx):
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import './index.css';
import App from './App.tsx';
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
);
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/index.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. 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 your global 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" />
4. Render your first component#
Import components directly from @nova-design-system/nova-react and lay them out with Tailwind utilities:
import { useState } from 'react';
import { NvAlert, NvButton, NvFieldtext } from '@nova-design-system/nova-react';
export default function App() {
const [name, setName] = useState('');
const [greeting, setGreeting] = useState('');
return (
<div className="flex max-w-md flex-col gap-4 p-6">
<NvFieldtext
label="Name"
placeholder="Enter your name"
value={name}
onValueChanged={(event) => setName(event.detail)}
/>
<NvButton
emphasis="high"
onClick={() =>
setGreeting(name ? `Hello, ${name}.` : 'Hello from Nova.')
}
>
Say hello
</NvButton>
{greeting && <NvAlert feedback="information" heading={greeting} />}
</div>
);
}
Working with slots#
Default slot content goes directly inside a component as React children. For named slots, add the slot attribute to the slotted element:
import { NvButton, NvIcon } from '@nova-design-system/nova-react';
export function ExportButton() {
return (
<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>
);
}
Next steps#
- Styling with TailwindLay out, space and customise Nova components with Tailwind classes.
- Next.js IntegrationSet Nova up in a Next.js app, with server and client components and dark mode.
- 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.