1.0.14 • Published 2 years ago

react-swm-icon-pack v1.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React SWM Icon Pack

NPM

Cover art

     

About the pack

Carefully designed icons to help your projects shine like a diamond. More than 1100 icons divided into 4 styles and several categories are ready as react components to speed up building your product.

SWM Icon Pack was originally published on Figma Community as SVG icon pack, now the family expanded thanks to React Icon Pack and Figma Plugin, everything is free and ready to use.

     

What’s in it for you?

  • More than 1100 react components, ready to use right away;

  • 4 styles of icons - outline, broken, duotone, and curved;

  • Customization options - stroke, size, set, and color;

  • Easy preview on Figma Community;

     

Cover art

Cover art

Cover art

Cover art

     

Related projects

     

Installation

yarn add react-swm-icon-pack

or

npm i react-swm-icon-pack

     

Usage

import React from 'react';
import { Air } from 'react-swm-icon-pack';

const App = () => {
  return <Air />;
};

export default App;

You can also pass inline props to the icon

<Air color="purple" set="duotone" size="40" />

or even your custom styles

<Air style={{ transform: 'scale(2, 0.5)' }} />

You can also use SWMIcon component and pass as a prop icon name you prefer:

import React from 'react';
import { SWMIcon } from 'react-swm-icon-pack';

const App = () => {
  return <SWMIcon name="Air" color="purple" set="duotone" />;
};

export default App;

You can also include the whole icon pack:

import React from 'react';
import * as SWMIconPack from 'react-swm-icon-pack';

const App = () => {
  return <SWMIconPack.Air color="purple" set="duotone" size="40" />;
};

export default App;

You can also use SWMIconProvider component, this will make all the icons that are within the context use the Provider properties. Setting props for any icon wrapped in SWMIconProvider will override Provider's properties.

import React from 'react';
import { SWMIconProvider, Air, Calendar, Cam } from 'react-swm-icon-pack';

const App = () => {
  return (
    <SWMIconProvider color="purple" set="duotone" size="40" strokeWidth="1.8">
      <Air />
      <Calendar />
      <Cam color="blue" set="curved" />
    </SWMIconProvider>
  );
};

export default App;

     

Available props

PropTypeDefaultDescription
namestringThe icon you want to render
styleobjectCustom styles property
setoutline broken duotone curvedoutlineIcons set option
sizestring number24Size of icon (applies as both width and height)
strokeWidthstring number1.5Line stroke for icons
colorstring#001A72Primary color for icons
1.0.14

2 years ago

1.0.13

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.12

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago