Developing
Wave has everything you need to get started building web interfaces at Volue. Develop a consistent and accessible user interfaces much faster using a range of pre-built components.
Developing

Authenticating to package registry#
Since @volue is a private NPM scope, your project (both locally and in CI pipeline) needs to be authenticated with NPM registry to fetch packages.
Wave packages are published to both official npmjs.com registry and our organisation's GitHub Package Registry.
The best way to authenticate with npmjs.com registry is using an access token. You can find pre-generated authentication token with read-only permissions required to download Wave packages in the wiki page on GitHub.
# 1. Do this once on your local machine. It adds the line to the user-level# `~/.npmrc`, which both npm and pnpm read.echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ~/.npmrc# 2. Add this environment variable locally# Substitute `READ_ONLY_NPM_TOKEN` with a real token:# https://github.com/Volue/wave/wiki/NPM-authentication-tokenexport NPM_TOKEN=READ_ONLY_NPM_TOKEN# 3. On CI/CD, set `NPM_TOKEN` from a secret and run the command from step 1# before installing dependencies. In GitHub Actions, use the org-wide# `secrets.VOLUE_PLATFORM_NPM_TOKEN`.
Don't commit the _authToken line to your project's .npmrc: pnpm ignores it there.
If, for some reason, you're not able to access the NPM authentication token page, please contact the Design System team.
Installation#
Inside your project directory, install Wave by running one of the following:
npm install @volue/wave @volue/wave-react --save
pnpm add @volue/wave @volue/wave-react
yarn add @volue/wave @volue/wave-react
Bleeding edge pre-release version with the most recent features, can be installed by appending @next tag to the package names:
pnpm add @volue/wave@next @volue/wave-react@next
Include Wave core assets#
The guide below is useful for custom setups. As long as you're using one of our starter project templates, you can skip these instructions, as these templates are already preconfigured.
For Wave to work correctly, you need to include its core assets, such as stylesheets, icons and web fonts.
To copy core assets from node_modules/@volue/wave to a location where you store your other bundled and minified assets for production, you may use copy-wave-assets command:
npx copy-wave-assets ./dist# orpnpm exec copy-wave-assets ./dist# oryarn copy-wave-assets ./dist
copy-wave-assets will create a directory named wave in the location you’ve specified (./dist in the example above). See copy-wave-assets -h for more information.
It is recommended to add a script to your package.json that runs copy-wave-assets and call it whenever the build is executed to make sure you’ve always got the latest assets copied over:
"scripts": {"sync-wave-assets": "copy-wave-assets ./public","build": "npm run sync-wave-assets && react-scripts build","start": "npm run sync-wave-assets && react-scripts start"}}
Alternatively, you could use tools such as CopyWebpackPlugin or viteStaticCopy to move core Wave resources to your assets directory as part of your build process.
Include assets in your HTML template#
Once you have a copy task in place and and the assets are copied over, you can serve them using <link> tags in your root HTML template.
-
Add links to favicons
-
Preload the subset web fonts using
<link rel="preload">. The subset fonts cover the most common characters and are preloaded for instant rendering. Full font files are loaded on demand viaunicode-rangeonly when characters outside the subset are needed. -
Add link to the CSS bundle to include the core Wave styles.
-
The final markup should resemble:
Use the components#
All components are available as named exports from @volue/wave-react.
Import any of the components in your React project and use them in your interface:
import { Collapsible, Button, SvgIcon } from '@volue/wave-react';const Component = () => {return (<Collapsible.Root><Collapsible.Trigger as={Button} variant="outline"><SvgIcon iconName="chevronDown" /> {'Toggle panel'}</Collapsible.Trigger><Collapsible.Panel>{'Panel content'}</Collapsible.Panel></Collapsible.Root>);};
Refer to the individual component documentation for recommended usage and API references for each component. To customise their styles or build your own styled components, see Styling.
Server rendering#
Wave's styles render on the server with one line of setup: <WaveStyles />. You don't need a style registry, useServerInsertedHTML or getCssText(). Each component renders its CSS as <style> elements, which React 19 moves into the <head> of the page and sends with the HTML.
Server rendering needs React 19. Apps that render only in the browser, such as Vite single-page apps, need neither React 19 nor WaveStyles.
Render WaveStyles once, before any Wave component. It keeps Wave's styles in the right order. The design tokens come from the Wave core stylesheet.
In the Next.js App Router, render WaveStyles as the first child of <body> in the root layout. It is a client component, so the layout can stay a server component:
// app/layout.jsximport { WaveStyles } from '@volue/wave-react';export default function RootLayout({ children }) {return (<html lang="en"><body><WaveStyles />{children}</body></html>);}
In the Next.js Pages Router, render WaveStyles first in _app:
// pages/_app.jsximport { WaveStyles } from '@volue/wave-react';export default function App({ Component, pageProps }) {return (<><WaveStyles /><Component {...pageProps} /></>);}
With any other React 19 server renderer, render WaveStyles before the first Wave component.
In React Server Components, such as the Next.js App Router, render Wave components directly: each one is a client component, so you don't need to add 'use client' yourself.
Example React projects#
Below you will find various project templates on GitHub, demonstrating the integration of Wave with popular bundlers/frameworks and very basic components usage.