svelte.mdx 912 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ---
  2. title: Tabler Icons for Svelte
  3. ---
  4. ![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-svelte.png)
  5. ## Installation
  6. <TabsPackage name="@tabler/icons-svelte" />
  7. or just [download from Github](https://github.com/tabler/tabler-icons/releases).
  8. ## How to use
  9. It's build with ESmodules so it's completely tree-shakable. Each icon can be imported as a component.
  10. ```sveltehtml
  11. <script lang="ts">
  12. import { IconHeart } from '@tabler/icons-svelte';
  13. </script>
  14. <main>
  15. <IconHeart />
  16. </main>
  17. ```
  18. You can pass additional props to adjust the icon.
  19. ```html
  20. <IconHeart size={48} stroke={1} />
  21. ```
  22. ### Props
  23. | name | type | default |
  24. | ------------- | -------- | ------------ |
  25. | `size` | _Number_ | 24 |
  26. | `color` | _String_ | currentColor |
  27. | `stroke` | _Number_ | 2 |
  28. | `class` | _String_ | |