Combine SVG symbols into one reusable icon sprite.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Multiple SVG symbols are collected into one document with reusable ids; a use element references each symbol and applies a viewport or transform when instanced. The sprite keeps geometry once while allowing many placements. Each instance can apply its own size or transform without copying the symbol paths.
[object Object],[object Object]
<svg xmlns="http://www.w3.org/2000/svg" style="display:none;">
<symbol id="circle" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10"/>
</symbol>
<symbol id="square" viewBox="0 0 24 24">
<rect x="2" y="2" width="20" height="20"/>
</symbol>
</svg>
<!-- Usage examples: -->
<!-- <svg><use href="#circle"/></svg> -->
<!-- <svg><use href="#square"/></svg> -->
Web apps, design systems, and build pipelines combine SVG icon sets.