包详细信息

iconista

streamich487Unlicense2.23.0

Thousands of SVG icons with one React component

自述文件

iconista

Listen to podcast:

https://github.com/user-attachments/assets/aadf4d0e-39d9-4214-8a61-4876989d558a

  • Thousands of SVG icons. See to Storybook.
  • Just one React component.
  • Icons are lazy-loaded, so you only load the icons you use.
  • TypeScript autocompletion for icon sets and icons.
  • Inline icons as SVG elements, so you can apply CSS styling to them.
  • All icons are responsive (SVG widht and height attributes are removed).
  • fill SVG properties are not set, so you can color icons with CSS.
  • SVG icons are optimized with SVGO.

autocomplete

React usage

import Svg from 'iconista';

<Svg set='ibm_16' icon='arrow--down' />

Or, simply get the icon URL:

import {getUrl} from 'iconista/lib/getUrl'

const url = getUrl({set: 'ibm_16', icon: 'arrow--down'})

Static usage

You can access icons directly from a public CDN, using icon's {set} and {icon} identifiers. For example, you can use the JsDelivr CDN:

Using JsDelivr:

https://cdn.jsdelivr.net/npm/iconista@2/sets/{set}/{icon}.svg

Using UNPKG:

https://unpkg.com/iconista@2/sets/{set}/{icon}.svg

Using ESM.sh:

https://esm.sh/iconista@2/sets/{set}/{icon}.svg

License

All icon sets and this repository are distributed under permissive open-source licenses: