gatsby-plugin-svg-sprite

    2.0.1 • Public • Published

    gatsby-plugin-svg-sprite

    npm version dependencies Status

    svg-sprite plugin for Gatsby

    Table of contents

    Installation

    Install gatsby-plugin-svg-sprite via npm.

    npm install gatsby-plugin-svg-sprite --save

    Add gatsby-plugin-svg-sprite to your plugins in gatsby-config.js.

    module.exports = {
      plugins: [
        'gatsby-plugin-svg-sprite',
      ],
    };

    Usage

    import twitterIcon from './path/to/twitter.svg';
     
    const Icon = () => (
      <svg>
        <use xlinkHref={`#${twitterIcon.id}`} />
      </svg>
    );

    License

    MIT License

    Copyright (c) 2018 Marco Biedermann

    Install

    npm i gatsby-plugin-svg-sprite

    DownloadsWeekly Downloads

    1,016

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    3.83 kB

    Total Files

    6

    Last publish

    Collaborators

    • marcobiedermann