Search documentation

Search pages, components, blocks, styles and colours.

Get started
Skip to content

Static and desktop

PreviousNext

SVG files, sprites, JSON and SVG strings for any framework, and PNG tray and menu icons for Electron and Tauri.

Installation

bun add @fabricator-ui/icons-static

What's inside

PathContent
icons/<name>.svgOutline icons, byte for byte as Lucide ships them
brands/<name>.svgBrand marks in one colour (currentColor)
brands/color/<name>.svgBrand marks in their own colours
sprite.svg, brands-sprite.svgEvery icon or mark as a <symbol>
icon-nodes.json, brand-nodes.jsonShapes per icon; brand art, colours and scale
tags.jsonSearch tags per outline icon
@fabricator-ui/icons-static/nodesThe same shape data as typed modules

SVG strings

For server templates, Vue, Svelte, web components or plain HTML:

import { House } from "@fabricator-ui/icons-static"
import { Github, GithubColor } from "@fabricator-ui/icons-static/brands"
 
element.innerHTML = House

Names are PascalCase, with Lucide's aliases.

Sprite

Serve sprite.svg and reference each icon by name. The stroke attributes live on each symbol:

<svg width="24" height="24" aria-hidden="true">
  <use href="/sprite.svg#house" />
</svg>

Desktop apps

Electron and Tauri render their interface in a webview, so use @fabricator-ui/icons there. Trays, menus and notifications need raster images instead. The fabricator-icons command renders them from the same data:

bun add --save-dev @resvg/resvg-js
npx fabricator-icons png house bell --size 16 --scale 1,2 --template --out src-tauri/icons/tray
OptionDefaultDescription
--set <outline|brands>outlineWhich set the names come from. Aliases work.
--size <points>16Width and height at 1x.
--scale <list>1,2Pixel densities: house.png, house@2x.png.
--color <colour>#000000Any CSS colour; brand for brand colours.
--stroke <width>2Stroke width of outline icons.
--templatemacOS template images: black on transparent, named <name>Template.png.
--out <directory>.Where to write the files.

Electron's Tray treats files named …Template.png as macOS template images, which follow the menu bar's colour. In Tauri, pass the PNG to the tray with iconAsTemplate: true, and enable the image-png Cargo feature to load it.

In Electron's main process:

import path from "node:path"
import { Tray } from "electron"
 
const tray = new Tray(path.join(__dirname, "icons/bellTemplate.png"))