mirror of
https://github.com/tabler/tabler-icons.git
synced 2025-01-16 20:28:28 +01:00
46 lines
1017 B
Plaintext
46 lines
1017 B
Plaintext
---
|
|
title: Tabler Icons for Vue
|
|
---
|
|
|
|
![](https://raw.githubusercontent.com/tabler/tabler-icons/master/.github/packages/og-package-vue.png)
|
|
|
|
## Installation
|
|
|
|
<TabsPackage name="@tabler/icons-vue" />
|
|
|
|
or just [download from Github](https://github.com/tabler/tabler-icons/releases).
|
|
|
|
## How to use
|
|
|
|
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.
|
|
|
|
```vue
|
|
<template>
|
|
<IconHome />
|
|
</template>
|
|
|
|
<script>
|
|
// Returns Vue component
|
|
import { IconHome } from '@tabler/icons-vue';
|
|
|
|
export default {
|
|
components: { IconHome }
|
|
};
|
|
</script>
|
|
```
|
|
|
|
You can pass additional props to adjust the icon.
|
|
|
|
```html
|
|
<IconHome color="red" :size="48" stroke-width="1" />
|
|
```
|
|
|
|
### Props
|
|
|
|
| name | type | default |
|
|
| ------------- | -------- | ------------ |
|
|
| `size` | _Number_ | 24 |
|
|
| `color` | _String_ | currentColor |
|
|
| `stroke` | _Number_ | 2 |
|
|
|