Installation
Pick the tab that matches your stack. Every setup bundles its fonts locally and reads the same flavor attributes. Commands use pnpm; npm, Yarn and Bun work the same way.
-
Install the CSS package.
Terminal window pnpm add @nyxwire/css -
Import the full bundle: tokens, fonts, base styles, components and utilities.
@import '@nyxwire/css';To take only some layers, declare the layer order first, then import the entry points you need:
@layer theme, base, components, utilities;@import '@nyxwire/css/tokens.css';@import '@nyxwire/css/fonts.css';@import '@nyxwire/css/components.css'; -
Set a flavor on the document and use the
nw-*classes.<html data-flavor="nocturne" data-theme="dark"><body><button class="nw-btn nw-btn-primary">Connect</button></body></html>
Without data-flavor, Nocturne applies, and a system that prefers light gets Lumen. To persist a visitor’s choice, use the Astro FlavorScript or Vue’s useFlavor.
-
Install Tailwind 4 with its Vite plugin (or CLI) and the theme.
Terminal window pnpm add -D tailwindcss @tailwindcss/vitepnpm add @nyxwire/tailwind -
Import the theme after Tailwind in your stylesheet.
@import 'tailwindcss';@import '@nyxwire/tailwind'; -
Use semantic utilities. They reference CSS variables, so flavors switch at runtime.
<html data-flavor="nocturne" data-theme="dark"><body class="bg-canvas text-fg font-sans"><button class="bg-primary text-on-primary rounded-md glow-sm">Connect</button></body></html>
See Tailwind setup for the theme-only entry and for opting out of Tailwind’s default colors.
-
Install the components, the theme they are styled with, and Tailwind.
Terminal window pnpm add @nyxwire/vue @nyxwire/tailwind vuepnpm add -D tailwindcss @tailwindcss/vite @vitejs/plugin-vue -
Add the three-line stylesheet. The last line points Tailwind at the component sources.
src/style.css @import 'tailwindcss';@import '@nyxwire/tailwind';@import '@nyxwire/vue/tailwind.css'; -
Register the components (or import them by name) and wrap the app in
NwProvider.src/main.ts import { createApp } from 'vue'import { NyxwirePlugin } from '@nyxwire/vue'import App from './App.vue'import './style.css'createApp(App).use(NyxwirePlugin).mount('#app')src/App.vue <template><NwProvider><NwFlavorSelect /></NwProvider></template>
More in Vue.
-
Install the integration and the CSS it imports.
Terminal window pnpm add @nyxwire/astro @nyxwire/css -
Register it. It injects the flavor script into every page head and imports the full CSS.
astro.config.mjs import { defineConfig } from 'astro/config'import nyxwire from '@nyxwire/astro'export default defineConfig({integrations: [nyxwire({ flavors: { dark: 'abyss' }, accent: 'indigo' })],}) -
Render pages with the layout and offer a flavor picker.
src/pages/index.astro ---import Layout from '@nyxwire/astro/components/Layout.astro'import FlavorSelect from '@nyxwire/astro/components/FlavorSelect.astro'---<Layout title="Home"><main class="nw-container"><h1>Signal online</h1><FlavorSelect /></main></Layout>
More in Astro integration.
-
Install the plugin next to Starlight.
Terminal window pnpm add @nyxwire/starlight -
Add it to Starlight’s
plugins.astro.config.mjs import { defineConfig } from 'astro/config'import starlight from '@astrojs/starlight'import nyxwireStarlight from '@nyxwire/starlight'export default defineConfig({integrations: [starlight({title: 'My docs',plugins: [nyxwireStarlight()],}),],})
The plugin themes the whole site, swaps the theme picker for a flavor picker and generates code themes from the palette’s syntax roles. More in Starlight setup.