vue.mdx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ---
  2. title: Vue
  3. description: Tabler Icons library for Vue framework.
  4. summary: Tabler Icons for Vue offers a collection of customizable and scalable icons designed for use in Vue applications, providing a powerful tool for creating modern and engaging interfaces.
  5. ---
  6. ![](/docs/icons/package-vue.png)
  7. ## Installation
  8. <TabsPackage name="@tabler/icons-vue" />
  9. or just [download from Github](https://github.com/tabler/tabler-icons/releases).
  10. ## How to use
  11. 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.
  12. ```vue
  13. <template>
  14. <IconHome />
  15. </template>
  16. <script>
  17. // Returns Vue component
  18. import { IconHome } from '@tabler/icons-vue';
  19. export default {
  20. components: {
  21. IconHome
  22. }
  23. };
  24. </script>
  25. ```
  26. You can pass additional props to adjust the icon.
  27. ```html
  28. <IconHome color="red" :size="48" stroke-width="1" />
  29. ```
  30. ### Props
  31. | name | type | default |
  32. | ------------- | -------- | ------------ |
  33. | `size` | _Number_ | 24 |
  34. | `color` | _String_ | currentColor |
  35. | `stroke` | _Number_ | 2 |