raster-react
v0.1.1
Published
Raster is built with ES Modules, so it's completely tree-shakable.
Downloads
78
Maintainers
Readme
How to use
Raster is built with ES Modules, so it's completely tree-shakable.
Each icon can be imported as a React component, which renders an inline SVG element. This way, only the icons that are imported into your project are included in the final bundle. The rest of the icons are tree-shaken away.
Example
Additional props can be passed to adjust the icon:
import { Heart } from 'raster-react';
const App = () => {
return (
<Heart
color='#f54'
size={13}
radius={2}
strokeWidth={1}
className='h-13 w-13'
/>
);
};
export default App;
Props
| name | type | default |
| ------------- | -------- | ------------ |
| size
| number | 24 |
| color
| string | currentColor |
| strokeWidth
| number | 2 |
| radius
| number | 1 |
| className
| string | |