vue.mdx 1017 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ---
  2. title: Tabler Icons for Vue
  3. ---
  4. ![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-vue.png)
  5. ## Installation
  6. <TabsPackage name="@tabler/icons-vue" />
  7. or just [download from Github](https://github.com/tabler/tabler-icons/releases).
  8. ## How to use
  9. All icons are Vue components that contain SVG elements. So any icon can be imported and used as a component. It also helps to use threeshaking, so you only import the icons you use.
  10. ```vue
  11. <template>
  12. <IconHome />
  13. </template>
  14. <script>
  15. // Returns Vue component
  16. import { IconHome } from '@tabler/icons-vue';
  17. export default {
  18. components: { IconHome }
  19. };
  20. </script>
  21. ```
  22. You can pass additional props to adjust the icon.
  23. ```html
  24. <IconHome color="red" :size="48" stroke-width="1" />
  25. ```
  26. ### Props
  27. | name | type | default |
  28. | ------------- | -------- | ------------ |
  29. | `size` | _Number_ | 24 |
  30. | `color` | _String_ | currentColor |
  31. | `stroke` | _Number_ | 2 |