1.0.0 • Published 1 year ago
@nucleus-ui/nucleus-icons v1.0.0
Nucleus Icons
A collection of SVG icons available as React components.
Installation
npm install nucleus-icons
# or
yarn add nucleus-iconsUsage
import { RegularIcons, SolidIcons } from 'nucleus-icons';
function MyComponent() {
return (
<div>
<RegularIcons.IconName width="24" height="24" />
<SolidIcons.IconName width="24" height="24" />
</div>
);
}Icon Preview
You can view all available icons using the included preview component:
import { IconGrid } from 'nucleus-icons/showcase';
function IconPreview() {
return <IconGrid />;
}Available Props
All icons accept the following props:
| Prop | Type | Default | Description |
|---|---|---|---|
| width | string or number | "1.5em" | The width of the icon |
| height | string or number | "1.5em" | The height of the icon |
| color | string | "currentColor" | The stroke color of the icon |
| strokeWidth | string or number | "1.5" | The stroke width of the icon |
Plus all standard SVG attributes and event handlers.
License
MIT
1.0.0
1 year ago