svelte.mdx 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ---
  2. title: Svelte
  3. description: Tabler Icons library for Svelte framework.
  4. summary: Tabler Icons for Svelte provides a clean and efficient way to use Tabler's comprehensive icon set in Svelte applications, helping developers deliver polished, user-friendly designs.
  5. ---
  6. ![](/docs/icons/package-svelte.png)
  7. ## Installation
  8. <TabsPackage name="@tabler/icons-svelte" />
  9. or just [download from Github](https://github.com/tabler/tabler-icons/releases).
  10. ## How to use
  11. It's build with ESmodules so it's completely tree-shakable. Each icon can be imported as a component.
  12. ```sveltehtml
  13. <script lang="ts">
  14. import { IconHeart } from '@tabler/icons-svelte';
  15. </script>
  16. <main>
  17. <IconHeart />
  18. </main>
  19. ```
  20. You can pass additional props to adjust the icon.
  21. ```html
  22. <IconHeart size={48} stroke={1} />
  23. ```
  24. ### Props
  25. | name | type | default |
  26. | ------------- | -------- | ------------ |
  27. | `size` | _Number_ | 24 |
  28. | `color` | _String_ | currentColor |
  29. | `stroke` | _Number_ | 2 |
  30. | `class` | _String_ | |