|
1 |
| -# CoreUI Icons Vue |
| 1 | +<p align="center"> |
| 2 | + <a href="https://coreui.io/"> |
| 3 | + <img src="https://coreui.io/images/brand/coreui-icons.svg" alt="CoreUI Icons logo" height="50"> |
| 4 | + </a> |
| 5 | +</p> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | + Official Vue.js component for CoreUI Icons and CoreUI Icons PRO. |
| 9 | + <br> |
| 10 | + <a href="https://coreui.io/vue/docs/components/icon.html"><strong>Explore CoreUI Icons for Vue docs »</strong></a> |
| 11 | + <br> |
| 12 | + <br> |
| 13 | + <a href="https://github.com/coreui/coreui-icons/issues/new?template=bug_report.md">Report bug</a> |
| 14 | + · |
| 15 | + <a href="https://github.com/coreui/coreui-icons/issues/new?template=feature_request.md">Request feature</a> |
| 16 | + · |
| 17 | + <a href="https://blog.coreui.io/">Blog</a> |
| 18 | +</p> |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +## Status |
2 | 23 |
|
3 | 24 | [][coreui]
|
4 | 25 | [][coreui]
|
5 | 26 | [][coreui]
|
6 | 27 |
|
7 | 28 | [coreui]: https://coreui.io/icons
|
8 | 29 |
|
9 |
| -## CIcon component |
10 | 30 |
|
11 |
| -Dedicated component used to implement [CoreUI Icons SVG set](https://coreui.io/icons/) in Vue.js. |
| 31 | +## Installation |
| 32 | + |
| 33 | +```bash |
| 34 | +npm install @coreui/icons |
| 35 | +npm install @coreui/icons-vue |
| 36 | +``` |
12 | 37 |
|
13 |
| -### Features |
| 38 | +or |
14 | 39 |
|
15 |
| -- Can load icons in three ways: |
16 |
| - - stored globally in Vue root object, |
17 |
| - - directly passed SVG tag content, |
18 |
| - - source link to SVG file |
19 |
| -- Greatly reduce icons bundle size, when imported as single icons, |
20 |
| -- Full functionality of 'svg' html tag, |
21 |
| -- Clean API |
| 40 | +```bash |
| 41 | +yarn add @coreui/icons |
| 42 | +yarn add @coreui/icons-vue |
| 43 | +``` |
22 | 44 |
|
23 |
| -For component description visit [CIcon component documentation](https://coreui.io/vue/docs/components/icon) |
| 45 | +## Use |
24 | 46 |
|
25 |
| -### Installation |
| 47 | +### Single icon |
26 | 48 |
|
27 |
| -If you already have installed [CoreUI Vue component library](https://coreui.io/vue/docs) plugin, then you have CIcon component already installed, otherwise install package by: |
| 49 | +```jsx |
| 50 | +import { CIcon } from '@coreui/icons-vue'; |
| 51 | +import { cifAu } from '@coreui/icons'; |
28 | 52 |
|
29 |
| -```shell |
30 |
| -npm install @coreui/icons-vue --save |
| 53 | +... |
| 54 | +<CIcon :icon="cilAu" size="xxl"/> |
| 55 | +... |
31 | 56 | ```
|
32 | 57 |
|
33 |
| -### License |
| 58 | +### All icons |
| 59 | + |
| 60 | +```jsx |
| 61 | +import { CIcon } from '@coreui/icons-vue'; |
| 62 | +import * as icon from '@coreui/icons'; |
| 63 | + |
| 64 | +... |
| 65 | +<CIcon :icon="icon.cilList" size="xxl"/> |
| 66 | +... |
| 67 | +``` |
34 | 68 |
|
35 |
| -CoreUI Icons Free is free, open source, and GPL friendly. You can use it for |
36 |
| -commercial projects, open source projects, or really almost whatever you want. |
| 69 | +## API |
37 | 70 |
|
38 |
| -- Icons — CC BY 4.0 License |
39 |
| - - In the CoreUI Icons Free download, the CC BY 4.0 license applies to all icons packaged as .svg and .js files types. |
40 |
| -- Fonts — SIL OFL 1.1 License |
41 |
| - - In the CoreUI Icons Free download, the SIL OLF license applies to all icons packaged as web and desktop font files. |
42 |
| -- Code — MIT License |
43 |
| - - In the CoreUI Icons Free download, the MIT license applies to all non-font and non-icon files. |
| 71 | +| property | type | description | |
| 72 | +| --- | --- | --- | |
| 73 | +| customClassName | `string` \| `object` \| `string[]` | Use for replacing default CIcon component classes. Prop is overriding the 'size' prop. | |
| 74 | +| icon | `string` \| `string[]` | Name of the icon placed in React object or SVG content. | |
| 75 | +| height | `number` | The height attribute defines the vertical length of an icon. | |
| 76 | +| size | `sm` \| `md` \|`lg` \| `xl` \| `xxl` \| `3xl` \| `4xl` \| `5xl` \| `6xl` \| `7xl` \| `8xl` \| `9xl` | Size of the icon. | |
| 77 | +| use | `string` | If defined component will be rendered using `use` tag. | |
| 78 | +| title | `string` | Title tag content. | |
| 79 | +| width | `number` | The width attribute defines the horizontal length of an icon. | |
0 commit comments