Utilities & variants
The theme adds the Nyxwire motifs as Tailwind utilities. Every example on this page is rendered with the real utilities; switch the flavor in the header to see them follow it. The class-only equivalents for plain HTML (.nw-cut, .nw-wire, .nw-glow-md, …) are on Effects & motion.
Cut corners
Section titled “Cut corners”cut chamfers the top-right and bottom-left corners by --nw-cut (10px by default). The fill is a background gradient with transparent corners, and the 1px edge is a ::before layer clipped to the chamfered ring, so the element itself stays unclipped. A cut element is therefore painted through these inputs instead of the usual utilities:
| Input | Default | Paints |
|---|---|---|
--nw-fill |
--nw-panel |
The surface inside the cut |
--nw-edge |
--nw-line |
The 1px edge |
--nw-cut |
10px |
The size of each chamfer |
18px cut, primary fill
<div class="cut p-5">…</div><button class="cut px-5 py-3 text-on-primary [--nw-cut:12px] [--nw-fill:var(--nw-primary)]"> Deploy</button>cut resets the border and the radius and sets its own background, so bg-*, border and rounded-* on the same element are dropped when classes are merged with cn(). On images, video, canvas, SVG and iframes it clips the media itself.
Wire edge
Section titled “Wire edge”wire draws a 1px primary-to-secondary gradient border with the padding-box/border-box background trick, so the fill must be opaque: it comes from --nw-fill as well. On a cut element the gradient becomes the edge of the chamfered shape. wire-glow adds the wire-colored bloom.
<div class="wire wire-glow rounded-lg p-5">…</div><div class="cut wire wire-glow p-5 [--nw-fill:var(--nw-canvas-subtle)]">…</div>glow-sm, glow-md and glow-lg set a box shadow from --nw-glow-sm, --nw-glow-md and --nw-glow-lg. Their color comes from --nw-glow-color, which defaults to the primary intent. Pick another color with glow-<color>: any semantic key (glow-danger), any raw key (glow-nw-flux), or the short raw form (glow-flux). A color utility only selects the color; it draws nothing on its own.
glow-sm
glow-md
glow-lg
glow-md glow-flux
glow-md glow-success
cut glow-md glow-danger
<button class="rounded-md bg-primary px-4 py-2 text-on-primary glow-sm">Connect</button><div class="rounded-lg border border-nw-flux/60 glow-md glow-flux">…</div>On a cut element the glow becomes a filter: drop-shadow(…), which follows the chamfered shape where a box shadow would draw the full rectangle. Glow strength scales with --nw-flavor-dark, so it is quieter on Lumen, where a full glow would smudge. Glow is an effect, not elevation: it sets box-shadow, so it replaces a shadow-* on the same element.
Text glow
Section titled “Text glow”text-glow adds --nw-glow-text. It shares --nw-glow-color with the box glow, so text-glow-<color> picks its color the same way.
text-primary text-glow
text-nw-ice text-glow text-glow-ice
LINK UP · text-success text-glow text-glow-success
Keep text glow for short labels and headings; body text stays crisp without it. A box glow and a text glow on the same element share one color, so use nested elements when they need two.
Wire gradient
Section titled “Wire gradient”bg-wire paints --nw-gradient-wire (135°, primary to secondary) as a fill. text-wire clips the same gradient to the glyphs and makes the text color transparent, so do not combine it with a text-* color. In forced-colors mode it falls back to solid system text.
text-wire
bg-wire with text-on-primary
Check contrast against the rendered surface when you use text-wire with a custom accent.
glass fills an element with --nw-glass and blurs what is behind it by --nw-blur-md. Its look depends on the backdrop, here the circuit grid:
glass scanlines
glass replaces an earlier bg-* color or backdrop-blur-* when classes are merged with cn(); a color written after it still applies.
Scanlines and circuit grid
Section titled “Scanlines and circuit grid”| Utility | Paints |
|---|---|
scanlines |
--nw-scanlines on a pointer-transparent ::after overlay; clipped to the shape on a cut element |
grid-bg |
The circuit grid: --nw-grid-line lines every --nw-grid-size (32px), with a primary node every fourth crossing |
Glitch
Section titled “Glitch”glitch runs one 480ms glitch burst when the element is hovered or focused, or when a link or button around it is. Inline elements become inline-block so the jitter can move them. It does nothing under prefers-reduced-motion: reduce.
<a href="/status" class="glitch font-display text-2xl">Status</a><button class="nw-btn"><span class="glitch">Reboot</span></button>Animations
Section titled “Animations”The decorative loops, rendered with the animation utilities from the theme:
animate-glow-pulse
animate-pulse
animate-shimmer
animate-spin
<div class="rounded-lg border border-danger/60 glow-danger animate-glow-pulse">Alarm</div><div class="bg-wire bg-size-[200%_100%] animate-shimmer">Syncing</div>animate-shimmer slides the background, so give it an image wider than the element (bg-size-[200%_100%]). With prefers-reduced-motion: reduce, the base stylesheet collapses every decorative animation to one near-instant iteration; turn on reduced motion in your system settings and the tiles stand still.
Variants
Section titled “Variants”| Variant | Applies when |
|---|---|
abyss:, nocturne:, twilight:, lumen: |
the element or an ancestor has that data-flavor |
dark: |
the element or an ancestor has a dark flavor (abyss, nocturne, twilight) |
light: |
the element or an ancestor has data-flavor="lumen" |
The line below holds one sentence per flavor, and only the current one is visible. Switch the flavor in the header:
abyss: Near-black indigo, for dense dashboards and HUDs.
<span class="hidden twilight:inline">…</span><div class="bg-panel abyss:bg-canvas-sunken">…</div>The variants match ancestors, and a nested scope does not cancel an outer one. This Lumen scope sits inside the page: on a dark page both badges show, on Lumen only light: does.
Prefer semantic utilities (bg-canvas, text-fg, border-line): they resolve in the nearest scope, nested or not. Keep variants for changes the tokens cannot express, such as a different layout or motif per flavor. The variants read data-flavor only, so set it explicitly: the Astro and Starlight flavor runtimes set it on <html>, and NwProvider’s flavor prop sets it on a Vue scope.