This package has been deprecated

Author message:

Use @mdi/js and make your own custom component instead

@c-bandy/svelte-material-icons

1.1.3 • Public • Published

Svelte Material Icons

Install

npm i @c-bandy/svelte-material-icons

Usage

<script>
  import Check from "@c-bandy/svelte-material-icons/dist/Check.svelte";
</script>

<Check {color} {size} {width} {height} {viewBox} />

Search Icons

You can search icons at materialdesignicons.com

Icon names are PascalCased from the original name in the site

check-outline converts to CheckOutline.svelte

Icon Example

<script>
  export let size = "1em";
  export let width = size;
  export let height = size;
  export let color = "currentColor";
  export let viewBox = "0 0 24 24";
</script>

<svg {width} {height} {viewBox}>
  <path d="..." fill={color} />
</svg>

Notes

If you wrap the icon into other element set the display of the parent element to flex

Contribute

This is a simple source to source compiler that transforms the svg files from https://github.com/Templarian/MaterialDesign to svelte components using cheerio

To develop you can do

git clone https://github.com/ramiroaisen/svelte-material-icons
cd svelte-material-icons
npm i
npm run build

Readme

Keywords

none

Package Sidebar

Install

npm i @c-bandy/svelte-material-icons

Weekly Downloads

2

Version

1.1.3

License

ISC

Unpacked Size

3.34 MB

Total Files

5662

Last publish

Collaborators

  • c-bandy
  • furudean