npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-icons-picker

v1.0.9

Published

## Overview

Downloads

3,069

Readme

React-Icons Icon Picker

Overview

react-icons-picker is a React icon picker for react-icons icons. It contains both a picker component and an icon renderer. Doesn't need any css loader. Sandbox Demo.

Icon Picker Demo

Installation

Install via npm

npm install react-icons-picker

or yarn

yarn add react-icons-picker

Usage

The IconPicker component is just like any other picker component. The value prop is the icon that is displayed on the picker. When a new icon is selected, the onChange handler is fired. You can customize the look and feel as you want by passing props or just selecting the css class.

import * as React from 'react'
import IconPicker from 'react-icons-picker'

export default () => {
  const [value, setValue] = React.useState("FaUsers")
  return (
    <IconPicker value={value} onChange={(v) => setValue(v)} />
  )
}

You can also use the IconPickerItem component to render the icon. This uses react-icons under the hood.

import * as React from 'react'
import { IconPickerItem } from 'react-icons-picker'

export default () => (
  <IconPickerItem value="FaUsers" size={24} color="#000" />
  )

All valid configurations/props of the package

IconPicker

| Prop | Type | Required | Description | | ----------------------- | ------------------- | -------- | -------------------------------------------------------------- | | value | string | true | The current font awesome icon displayed on the picker. | | onChange | (v: string) => void | true | A change handler that is executed when a new icon is selected. | | modalEmptyContent | React element | false | React component that gets displayed when search result is empty| | searchInputPlaceholder | string | false | The placeholder text for search input | | pickButtonStyle | CSSProperties | false | Styles for the picker button | | pickButtonFocusStyle | CSSProperties | false | Styles for the picker button focus | | modalFadeStyle | CSSProperties | false | Styles for the modal window's background fade effect | | modalWrapperStyle | CSSProperties | false | Styles for the modal window's centered wrapper div | | searchBarStyle | CSSProperties | false | Styles for the search input's wrapper div element | | searchInputStyle | CSSProperties | false | Styles for the search input | | searchInputFocusStyle | CSSProperties | false | Styles for the search input's focus | | modalContentWrapperStyle| CSSProperties | false | Styles for the modal window's content wrapper div | | modalIconsWrapperStyle | CSSProperties | false | Styles for the wrapper element of search result of icons | | modalIconsStyle | CSSProperties | false | Styles for the each instance of search result of icons | | modalIconNameStyle | CSSProperties | false | Styles for the each instance of search result of icon names | | modalIconsHoverStyle | CSSProperties | false | Styles for the hovering effect of each search result icons | | modalEmptyWrapperStyle | CSSProperties | false | Styles for the wrapper element of empty search result container|

IconPickerItem | Prop | Type | Required | Description | | ---- | --- | --- | --- | value | string | true | The name of the icon to render. Example: "FaUsers" | | size | number | false |The size of the icon. Default: 24 | | color | string | false | The color of the icon. Default: "#000" |

Contribution Guide

If you are interested in contributing, please submit a PR.

Contributors