Skip to content
Nyxwire theme preview. Switch the flavor in the header to check code blocks and every component below.

Starlight kitchen sink

This page renders every Starlight building block with the Nyxwire plugin: strong text, emphasis, struck text, inline code, a link to the code blocks, highlighted text, H2O and 103, an HUD, and the shortcut Ctrl + K that opens search.

Default Note Tip Success Caution Danger Small Medium Large

Flavors

Abyss, Nocturne and Twilight share the neon accents; Lumen brings a deeper set for daylight.

Palette

Twenty-four colors per flavor, frozen as hex.

Components

CSS classes, Tailwind utilities and Vue components share one look.

Astro

An integration with a flash-free flavor runtime.

Offline

Local fonts and no CDN: everything ships with the packages.

Primary action

Secondary

Minimal

Terminal window
pnpm add @nyxwire/starlight
  1. Install the plugin next to Starlight.

    Terminal window
    pnpm add @nyxwire/starlight
  2. Register nyxwireStarlight() in the Starlight plugins array.

  3. Pick a flavor in the header. The choice persists in localStorage.

  • astro.config.mjs register the plugin here
  • Directorysrc/
    • Directorycontent/
      • Directorydocs/
        • index.mdx
        • Directorystarlight/
          • kitchen-sink.mdx
    • Directorystyles/
      • global.css
  • package.json
  • …
flavor.ts
import type { FlavorName } from '@nyxwire/palette'
// Comments use overlay2 in italics.
const storageKey = 'nyxwire-flavor'
export function choose(flavor: FlavorName, retries = 3): boolean {
if (retries <= 0) return false
window.nyxwire?.setFlavor('auto')
window.nyxwire?.setFlavor(flavor)
return /^(abyss|nocturne|twilight|lumen)$/.test(flavor) && storageKey.length > 0
}
Build the docs
pnpm build:docs
pnpm --filter @nyxwire/starlight test
:root {
--nw-glow-color: var(--nw-primary); /* neon */
color-scheme: dark;
}
.nw-btn:hover {
box-shadow: var(--nw-glow-sm);
}
package.json
{
"name": "my-docs",
"private": true,
"type": "module",
"dependencies": {
"@astrojs/starlight": "^0.42.10",
"@nyxwire/starlight": "^0.1.0"
}
}
const flavor = resolveFlavor(stored, prefersLight)
root.dataset.theme = 'dark'
root.dataset.theme = flavorMeta[flavor].dark ? 'dark' : 'light'
FlavorBadge.vue
<script setup lang="ts">
defineProps<{ flavor: string }>()
</script>
<template>
<span class="nw-badge nw-badge-soft" :data-flavor="flavor">{{ flavor }}</span>
</template>
index.html
<html lang="en" data-flavor="nocturne" data-accent="indigo">
<body class="bg-canvas text-fg">
<a class="nw-link" href="/status">A long link that wraps instead of scrolling.</a>
</body>
</html>
Flavor Role Base Text Order
Abyss Dense dashboards, HUDs #080720 #f0f1f7 0
Nocturne Default dark #14093e #f2f3fa 1
Twilight Softest dark #271a4b #f5f4fa 2
Lumen Light #eae6ff #1f0e47 3

The grid never sleeps; it just changes flavor.

Nyxwire has a neon for every hour, from abyss to lumen.

Open search with Ctrl + K (or ⌘ K on macOS) and close it with Esc.

What changes between dark flavors?

Only the neutral ramp: Abyss is near-black indigo, Nocturne deep electric indigo and Twilight a dusky violet. Accents are identical.

A white wire trace with two bends on a deep indigo background

  • Unordered list items take a primary marker.
  • Nested lists keep the same rhythm:
    • Abyss
    • Nocturne
  • Last item.
  1. Ordered lists use mono numerals.
  2. Second step.
  3. Third step.
  • Task lists render checkboxes.
  • Unchecked tasks too.

The flavor runtime runs before the first paint.1

Body copy under a level three heading.

Body copy under a level four heading.

Body copy under a level five heading.

Body copy under a level six heading.


The horizontal rule above uses the hairline token.

  1. It is an inline script in <head>, so no stylesheet or island waits for it. ↩