1.2.4 • Published 2 years ago
eldicons v1.2.4
Usage
All icons are built using SVG, meaning you can use the all the same ways as SVGs (img
, background-image
, inline
, embed
, iframe
).
Inline HTML
Copy the source for the icon you need from eldicons.com and inline it directly into your HTML.
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
stroke-width="2"
stroke="currentColor"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
>
<path fill="none" stroke="none" d="M0 0h24v24H0z" />
...
</svg>
React
First, installl eldicons
from npm:
npm install eldicons
Each icon can be individually imported as a React component.
import { Pizza } from 'eldicons';
const myComponent = () => {
return (
<Pizza
size={24} // set width and height
color='blue' // set stroke color
stroke={2} // set stroke width
/>
);
};
License
This library is MIT licensed.