Skip to content

appleple/react-icon-picker

Repository files navigation

React IconPicker

Screen Capture

Install

$ npm install react-icon-picker --save-dev

Usage

import * as React from 'react';
import IconPicker from 'react-icon-picker';

const icons = [
  'fas fa-camera',
  'fas fa-fish',
  'fas fa-align-center',
  'fas fa-align-justify'
];

const App = () => {

  const [state, setState] = React.useState({
    icon: ''
  });

  return (<>
    <span className={state.icon}></span>
    <IconPicker 
      icons={icons} 
      defaultValue="fas fa-camera" 
      onChange={(icon) => {
        setState({
          ...state,
          icon
        })
      }}
    />
  </>);
}

About

Just a simple icon picker for React

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published