|
| 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 React.js component for CoreUI Icons and CoreUI Icons PRO. |
| 9 | +<br> |
| 10 | +<a href="https://coreui.io/react/docs/components/icon/"><strong>Explore CoreUI Icons for React docs »</strong></a> |
| 11 | +<br> |
| 12 | +<br> |
| 13 | +<a href="https://.com/coreui/coreui-icons/issues/new?template=bug_report.md">Report bug</a> |
| 14 | +· |
| 15 | +<a href="https://.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 | +## Status |
| 22 | +[![npm package][npm-badge]][npm] |
| 23 | +[![NPM downloads][npm-download]][npm] |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +[npm-badge]: https://img.shields.io/npm/v/@coreui/icons-react/latest?style=flat-square |
| 28 | +[npm]: https://www.npmjs.com/package/@coreui/icons-react |
| 29 | +[npm-download]: https://img.shields.io/npm/dm/@coreui/icons-react.svg?style=flat-square |
| 30 | + |
| 31 | +## Installation |
| 32 | + |
| 33 | +```bash |
| 34 | +npm install @coreui/icons |
| 35 | +npm install @coreui/icons-react |
| 36 | +``` |
| 37 | + |
| 38 | +or |
| 39 | + |
| 40 | +```bash |
| 41 | +yarn add @coreui/icons |
| 42 | +yarn add @coreui/icons-react |
| 43 | +``` |
| 44 | + |
| 45 | +## Use |
| 46 | + |
| 47 | +### Single icon |
| 48 | + |
| 49 | +```jsx |
| 50 | +import { CIcon } from '@coreui/icons-react'; |
| 51 | +import { cifAU } from '@coreui/icons'; |
| 52 | + |
| 53 | +... |
| 54 | +render() { |
| 55 | +return ( |
| 56 | +<CIcon icon={cilList} size="xxl"/> |
| 57 | +) |
| 58 | +} |
| 59 | +... |
| 60 | +``` |
| 61 | + |
| 62 | +### All icons |
| 63 | + |
| 64 | +```jsx |
| 65 | +import { CIcon } from '@coreui/icons-react'; |
| 66 | +import * as icon from '@coreui/icons'; |
| 67 | + |
| 68 | +... |
| 69 | +render() { |
| 70 | +return ( |
| 71 | +<CIcon icon={icon.cilList} size="xxl"/> |
| 72 | +) |
| 73 | +} |
| 74 | +... |
| 75 | +``` |
| 76 | + |
| 77 | + |
| 78 | +## API |
| 79 | + |
| 80 | +| property | type | description | |
| 81 | +| --- | --- | --- | |
| 82 | +| className | `string` | A string of all className you want applied to the component. | |
| 83 | +| customClassName | `string` \| `object` \| `string[]` | Use for replacing default CIcon component classes. Prop is overriding the 'size' prop. | |
| 84 | +| icon | `string` \| `string[]` | Name of the icon placed in React object or SVG content. | |
| 85 | +| height | `number` | The height attribute defines the vertical length of an icon. | |
| 86 | +| size | `sm` \| `md` \|`lg` \| `xl` \| `xxl` \| `3xl` \| `4xl` \| `5xl` \| `6xl` \| `7xl` \| `8xl` \| `9xl` | Size of the icon. | |
| 87 | +| use | `string` | If defined component will be rendered using `use` tag. | |
| 88 | +| title | `string` | Title tag content. | |
| 89 | +| width | `number` | The width attribute defines the horizontal length of an icon. | |
0 commit comments