nocturne-css
v0.1.0
Published
Framework-agnostic CSS for the Nocturne design system. Class-based components (button, card, panel, alert, forms and more) that work in any HTML, no build step required.
Downloads
161
Maintainers
Readme
nocturne-css
Framework-agnostic, class-based CSS for the Nocturne design system. Works in plain HTML, Vue, Svelte, Astro, anything. No build step, no JavaScript.
Install
pnpm add nocturne-cssOr straight from a CDN:
<link rel="stylesheet" href="https://unpkg.com/nocturne-css/dist/nocturne.css" />Use
Add noct-root to your body (or noct to <html>) and use the classes:
<body class="noct-root noct-bg-wash noct-scanlines">
<button class="noct-btn noct-btn--primary">Jack in</button>
<div class="noct-card noct-card--cyan">
<div class="noct-card__header"><h3 class="noct-card__title">Uplink</h3></div>
<div class="noct-card__body">Signal locked.</div>
</div>
</body>The bundle includes nocturne-tokens (the CSS variables), so this is the only file
you need. To cherry-pick, import individual component files from ./src/components/.
Naming
BEM-ish: .noct-<block>, .noct-<block>__<element>, .noct-<block>--<modifier>.
Components
button · badge · card · alert · forms (field/label/input/textarea/select/checkbox) · panel · tabs · progress · stat-tile · divider · disclosure · task-chip · section-header · topbar · skeleton, plus utility effects (clip-corner, scanlines, grid-lines, glitch, status dot).
Build
npm run build regenerates dist/nocturne.css from the token layer + components via
scripts/bundle.mjs.
Apache-2.0.
