@peter-pakanun/svelte-icon

1.0.4 • Public • Published

Svelte Icon

I want to keep it simple and play nice with Tailwind CSS. You can use this with Material Design Icons via the @mdi/js package.

Usage

npm i -D @mdi/js @peter-pakanun/svelte-icon
<script>
  import Icon from '@peter-pakanun/svelte-icon';
  import { mdiAccount } from '@mdi/js';
</script>

<Icon d={mdiAccount} class="w-4 h-4 text-red-500" />

Props

Prop PropTypes Default Details
d string required SVG path data.
class string null SVG class attribute. e.g., w-4 h-4 text-red-500
fill string currentColor SVG fill color.
stroke string null SVG stroke color.
title string null content in title tag.

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @peter-pakanun/svelte-icon

    Weekly Downloads

    0

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    33.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • peter-pakanun