Shared UI icons for Publr products. This repository is deliberately framework- and package-manager-neutral: SVG files are the source of truth and the TypeScript and Zig adapters are committed generated artifacts.
Social and brand icons do not belong here. They will have their own package.
icons/*.svg— canonical 24×24 UI artwork.src/index.ts— browser/TypeScript adapter.publr_icons.zig— Zig adapter for the design-system and CMS.manifest.json— stable machine-readable icon inventory.index.html— generated, self-contained all-icons gallery.figma-plugin/— local Figma plugin that creates editable components.scripts/build.mjs— validates SVGs and regenerates every adapter.
import { iconSvg, iconRef, mountIconSprite } from "@publr/icons";
button.innerHTML = iconSvg("plus", "size-5");
mountIconSprite();The package has no runtime dependencies. Consumers may install it from the Git repository or vendor it directly.
Vendor or pin this repository in the source tree and register the committed Zig adapter as a build module:
const publr_icons = b.createModule(.{
.root_source_file = b.path("vendor/publr-icons/publr_icons.zig"),
});The CMS receives the same adapter through its vendored publr_ui.zig build
artifact, so CMS builds never run npm and never fetch icons at runtime.
npm run build
npm testBoth commands use Node's standard library only. Generated files must be committed with SVG changes.
Open index.html directly to browse every icon, search by name, switch theme,
and click an icon to copy its canonical name.
- Create or open an empty Figma Design file.
- Open Plugins → Development → Import plugin from manifest….
- Select
figma-plugin/manifest.jsonfrom this repository. - Run Plugins → Development → Generate Publr Icons.
- Verify the generated
Publr Iconspage, then choose File → Save local copy to produce a genuine.figfile.
The plugin creates one editable 24×24 component per manifest icon, names them
as Icon/<name>, arranges them in a preview grid, and adds SVG export settings.
It performs no network requests. Running it in a non-empty file creates a new
page instead of deleting or replacing existing work.