New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jprochazk/svelte-material-icons

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jprochazk/svelte-material-icons

Wrapper over the [MaterialDesign](https://github.com/Templarian/MaterialDesign) repository which transforms all `.svg` files to `.svelte` components.

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

svelte-material-icons

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.

Installation

$ npm install material-icons@npm:jprochazk/svelte-material-icons

Will install @jprochazk/svelte-material-icons under the material-icons alias

Usage

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" />

Keywords

FAQs

Package last updated on 18 Jul 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc