https://github.com/bem/yandex-ui-icons
https://github.com/bem/yandex-ui-icons
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bem/yandex-ui-icons
- Owner: bem
- License: other
- Created: 2021-07-29T17:32:03.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-29T11:26:47.000Z (over 4 years ago)
- Last Synced: 2025-03-20T19:18:06.448Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://bem.github.io/yandex-ui-icons
- Size: 2.05 MB
- Stars: 14
- Watchers: 18
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# @yandex/ui-icons (WIP)

[][npm]
## Installation
```sh
npm i -PE @yandex/ui-icons
```
## Usage (jsx)
**Simple**
```tsx
import { Search } from '@yandex/ui-icons'
export const App = () => {
return
}
```
**Set size**
Icons has next sizes: `12`, `16`, `24`, `32` (default `24`).
```tsx
import { Search } from '@yandex/ui-icons'
export const App = () => {
return
}
```
**Get ref**
```tsx
import { useRef } from 'react'
import { Search } from '@yandex/ui-icons'
export const App = () => {
const iconRef = useRef(null)
return
}
```
**Set className**
By default all icons has base className: `SvgIcon`.
```tsx
import { Search } from '@yandex/ui-icons'
export const App = () => {
return
}
```
**Change color**
At now color can be changed with context placement: `currentColor`.
```tsx
import { Search } from '@yandex/ui-icons'
export const App = () => {
return (
)
}
```
## Usage (svg)
All icons also available as svg files and can be used inside css or any svg-loaders.
```css
.Icon {
width: 24px;
height: 24px;
background-size: 100%;
background-image: url("@yandex/ui-icons/Search.svg");
}
```
## License
This project develop under [MPL-2.0](./LICENSE) license.
[npm]: https://www.npmjs.com/package/@yandex/ui-icons