hp-icon
Stroke-icon container. Slot in any SVG that uses currentColor. Size presets
align with the icon-sm/md/lg tokens (16 / 20 / 24px).
Install
bun add @hexpunk/core lit import "@hexpunk/core"; Properties
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
size | size | "sm" | "md" | "lg" | "md" | Icon size — `sm` (16px), `md` (default, 20px), or `lg` (24px). |
Slots
| Slot | Description |
|---|---|
(default) | SVG content (stroke-based icon) |
When to use
<hp-icon> when sizing needs to
align with the system's icon-sm/md/lg tokens — inside an
<hp-cell variant="utility">, next to a label in a toned
<hp-cell>, or as a section glyph.
stroke="currentColor" so the icon picks up the
containing scope's colour — including hover swaps from the parent atom.
<hp-icon> for pixel-art / sprite work — that's
<hp-pixel>'s territory (box-shadow grid, state morphing).
currentColor
inheritance; hardcoded colours break theme switching and hover hue swaps.
Lucide-mirrored icons
@hexpunk/core/icons mirrors selected Lucide icons (ISC licensed)
as named string exports — the inner SVG content without the outer
<svg> wrapper. Inline the path data into your own
<svg> for static HTML, or import the string and bind via
set:html (Astro) / dangerouslySetInnerHTML (React) /
innerHTML (vanilla):
No per-component entries in CHANGELOG.md yet.