Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
@jprochazk/svelte-material-icons
Advanced tools
Wrapper over the [MaterialDesign](https://github.com/Templarian/MaterialDesign) repository which transforms all `.svg` files to `.svelte` components.
Wrapper over the MaterialDesign repository which transforms all .svg
files to .svelte
components.
File names are converted from kebab-case.svg
to PascalCase.svelte
, e.g. google-translate.svg
to GoogleTranslate.svelte
. Each file is self-contained, so the package is easily tree-shakeable.
To install @jprochazk/svelte-material-icons
under the material-icons
alias:
With npm
:
$ npm install material-icons@npm:jprochazk/svelte-material-icons
With yarn
:
$ yarn add material-icons@npm:@jprochazk/svelte-material-icons
Or manually add this to your package.json
dependencies
:
"material-icons": "npm:@jprochazk/svelte-material-icons"
And run npm install
or yarn install
.
Search for icons at https://materialdesignicons.com/, then use them like so:
<script>
// google-translate.svg
import GoogleTranslateIcon from "material-icons/GoogleTranslate.svelte";
</script>
<a target="_blank" rel="noopener noreferrer" href="https://translate.google.com/">
<GoogleTranslateIcon />
</a>
Every component follows this template:
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="24"
height="24"
viewBox="0 0 24 24"
{...$$props}
>
<path d="..." />
</svg>
{...$$props}
allows you to overwrite/add any props, such as width
, height
, class
, on:click
, etc.:
<script>
import TranslateIcon from "material-icons/GoogleTranslate.svelte";
</script>
<TranslateIcon width="64" height="64" />
FAQs
Wrapper over the [MaterialDesign](https://github.com/Templarian/MaterialDesign) repository which transforms all `.svg` files to `.svelte` components.
We found that @jprochazk/svelte-material-icons demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.