# svg-sprite/svg-sprite

SVG sprites & stacks galore — A low-level Node.js module that takes a bunch of SVG files, optimizes them and bakes them into SVG sprites of several types along with suitable stylesheet resources (e.g. CSS, Sass, LESS, Stylus, etc.)

Repository: https://github.com/svg-sprite/svg-sprite
Canonical: https://ross.abutalabs.com/products/svg-sprite
Homepage: https://github.com/svg-sprite/svg-sprite
Language: JavaScript
License: MIT
License Family: permissive
Topics: svg, sprite, css, mustache, svgo, html, less, sass
Last push: 2026-02-28T02:34:44+00:00

## Health v2 (maintenance only)
Score: 54/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 69, release rhythm 8, longevity 100
- inputs: {"age_days": 4591, "days_push": 187, "days_rel": 559, "gap_med": null, "n_releases_24m": 1}
- flags: prerelease_only
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1986, forks 256 (observed 2026-08-28T04:06:02.699566+00:00)

## What it is
A low-level Node.js module that takes a batch of SVG files, optimizes them with SVGO, and generates SVG sprites of several types (CSS sprites, <defs>/<symbol> inline sprites, SVG stacks) along with matching stylesheet resources. It ships Mustache templates for CSS, Sass, Less, and Stylus output and can also produce an HTML example document.

## Use cases
- generate an SVG sprite sheet from a folder of icon SVGs
- create CSS sprites for background images from SVG files
- build inline <symbol> sprites for use with <use> elements
- generate Sass, Less, or Stylus variables and mixins for an icon set
- optimize SVG icons and bundle them into an SVG stack
- produce an HTML preview page demonstrating sprite usage
- integrate SVG sprite generation into a Grunt or Gulp build pipeline

## When to choose
- you need SVG sprites or icon spritesheets generated programmatically in Node.js
- you want stylesheet output in CSS or a preprocessor like Sass, Less, or Stylus
- you need multiple sprite types (CSS, <defs>, <symbol>, stacks) from one tool
- you want a low-level library to wrap in your own build tooling or task runner

## When to avoid
- you need a ready-made GUI or CLI-only workflow without writing Node.js code
- you want raster (PNG) sprite generation — consider iconizr for PNG fallbacks
- your project uses modern bundler icon plugins that inline SVGs automatically
- you need to sprite non-SVG raster images like JPEG or PNG sources

## Facets
- artifact type: library
- maturity: stable
- function: image-processing, templating, build-tool
- domain: web-development, frontend, graphics
- platform: cross-platform
- tags: svg, svg-sprite, css-sprites, icons, svgo, sass, less, stylus, mustache-templates, stylesheet-generation, nodejs

## Member repositories
- svg-sprite/svg-sprite (main) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:02.699566+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:03:07.142550+00:00, confidence not recorded.
  - readme: https://github.com/svg-sprite/svg-sprite (fetched 2026-08-28T04:06:02.699566+00:00, sha 9e9ce32115f9)
  - homepage: https://github.com/svg-sprite/svg-sprite (fetched 2026-08-29T10:43:17.732658+00:00, sha 0ac7ee70badb)
  - registry_npm: https://registry.npmjs.org/svg-sprite (fetched 2026-08-29T10:43:17.735602+00:00, sha 605ae39be28a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
