Icons
Nyxwire uses Lucide through @lucide/vue, a dependency of @nyxwire/vue: one stroked set, 24×24 grid, 2px stroke, ISC licensed. Icons are Vue components bundled with your app, so nothing loads from the network.
<script setup lang="ts">import { Map, MapIcon, Zap } from '@lucide/vue'</script>
<template> <button class="nw-btn nw-btn-primary"><Zap />Overclock</button> <button class="nw-btn nw-btn-ghost nw-btn-neutral nw-btn-icon" aria-label="Open map"> <MapIcon /> </button></template>Every icon is exported under its name and with an Icon suffix (Map and MapIcon); the suffixed form avoids shadowing globals such as Map.
Size and color
Section titled “Size and color”| Prop | Default | Notes |
|---|---|---|
size |
24 |
Sets width and height |
stroke-width |
2 |
In icon units, so it scales with the icon |
non-scaling-stroke |
false |
Keeps the stroke width constant at any size |
color |
currentColor |
The stroke; usually leave it and set the text color |
Inside Nyxwire components you rarely set size: the CSS sizes direct svg children to the text. Buttons use 1.2em (an icon button is square at the control height), badges 1em, and a stat icon fills its 20px box in the stat’s intent color. Elsewhere, use 16px next to small text, 20px next to body text and 24px for standalone icons. Each icon also gets the classes lucide and lucide-<name> for styling.
Accessibility
Section titled “Accessibility”- Lucide adds
aria-hidden="true"automatically unless you pass anaria-*attribute,roleortitle, so an icon next to a text label is ignored by screen readers, as it should be. - An icon-only button needs a name on the button:
aria-label="Open map". - A standalone icon that carries meaning (a status, a warning) gets
role="img"and anaria-label, or visible text next to it.
Outside Vue
Section titled “Outside Vue”These docs use Starlight’s <Icon> component. On plain HTML pages, copy the SVG markup of a Lucide icon from lucide.dev into the page; the nw-btn, nw-badge and nw-stat-icon classes size inline svg elements the same way.