Svelte Simple Icons
Based on Svelte Eva Icons
Install
yarn add --dev svelte-simple-icons
or use NPM
npm install --save-dev svelte-simple-icons
Usage
Unused icons will get removed with tree shaking in bundlers like webpack and rollup.
<!-- When using custom elements --> <!-- When using regular svelte compontent -->
Use the svg name when importing, and convert it to {PascalCase}Icon.
For instance, .NET
on the creators site has an SVG name of dot-net.svg
, so should be imported as <DotNetIcon />
See all icons here: https://simpleicons.org/
Exceptions
The one notable exception to the rule above is the 500px icon:
Styling
You can add CSS classes icons by passing a styleClass
attribute: