shift73k/assets_old/node_modules/svg-sprite-loader/examples/browser-sprite-extract-mode
2022-08-13 07:32:36 -04:00
..
build progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
demo.html progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
main.js progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
README.md progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
webpack.config.js progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00

Default browser runtime example

In browser sprite is rendered and injected in page automatically, you just refer to images via <svg><use xlink:href="#id"></use></svg>.

Demo

Input

import twitterIcon from '../assets/twitter.svg';

Reference in HTML

<svg>
  <use xlink:href="#twitter"></use>
</svg>

Input

Output