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 🙏

© 2026 – Pkg Stats / Ryan Hefner

nice-react-icon

v3.0.1

Published

A flexible and customizable React icon component with built-in icon set and theming support

Readme

nice-react-icon

A flexible and customizable React icon component with built-in icon set and theming support.

Features

  • 🎨 30+ Built-in Icons: Comprehensive icon set with fill and stroke variants
  • 📐 Flexible Sizing: 4 predefined sizes (1-4) with responsive scaling
  • 🎯 Status-based Theming: Automatic color theming based on status
  • 🔄 Animations: Built-in spinning animation and rotation support
  • 🖼️ Custom SVG Support: Use your own SVG URLs
  • Accessibility: Proper ARIA support and screen reader friendly
  • 📱 Responsive: Works across all device sizes
  • 🔧 TypeScript: Full type safety and IntelliSense support

Installation

npm install nice-react-icon

Peer Dependencies

npm install react styled-components

Quick Start

import Icon from 'nice-react-icon'

function App() {
  return (
    <Icon
      name="arrow"
      size={3}
      variant="stroke"
      color="blue"
    />
  )
}

Props Reference

| Prop | Type | Default | Description | |------|------|---------|-------------| | name | IconNameType | - | Icon name from the built-in set | | variant | "fill" \| "stroke" | "stroke" | Icon variant style | | url | string | - | Custom SVG URL (overrides name) | | color | string | - | Icon color (CSS value) | | backgroundColor | string | - | Background color for icon container | | size | 1 \| 2 \| 3 \| 4 | 3 | Icon size (smallest to largest) | | borderRadius | 1 \| 2 \| 3 | - | Border radius for icon container | | imageSize | string | "30%" | Image size as percentage of container | | status | StatusType | - | Status for automatic theming | | spinning | boolean | false | Whether icon should spin | | rotation | number | 0 | Rotation angle in degrees | | strokeWidth | 1 \| 2 | 1 | Stroke width for stroke variant | | isActive | boolean | true | Whether icon is in active state | | className | string | - | Additional CSS class |

Available Icons

The following icons are available in both fill and stroke variants:

  • arrow
  • attention
  • box
  • brush
  • calendar
  • cancel
  • carat
  • check
  • cloud
  • code
  • cog
  • contact
  • content
  • edit
  • link
  • lock
  • menu
  • message
  • pause
  • placeholder
  • plus
  • profile
  • puzzle
  • search
  • shuffle
  • skip
  • spinner
  • trash
  • upload
  • x

Usage Examples

Basic Icons

import Icon from 'nice-react-icon'

// Arrow icon
<Icon name="arrow" />

// Check icon with custom color
<Icon name="check" color="#10b981" />

// Plus icon with fill variant
<Icon name="plus" variant="fill" />

Different Sizes

<Icon name="search" size={1} /> // Small
<Icon name="search" size={2} /> // Medium
<Icon name="search" size={3} /> // Large (default)
<Icon name="search" size={4} /> // Extra Large

With Rotation and Animation

// Rotate 90 degrees
<Icon name="arrow" rotation={90} />

// Spinning icon
<Icon name="spinner" spinning />

// Loading state with auto-spin
<Icon status="active" />

Status-based Theming

<Icon name="check" status="success" />
<Icon name="x" status="error" />
<Icon name="attention" status="warning" />
<Icon name="arrow" status="primary" />

Custom SVG

<Icon
  url="/path/to/custom-icon.svg"
  size={3}
  color="#6366f1"
/>

With Background and Border Radius

<Icon
  name="profile"
  backgroundColor="#f3f4f6"
  borderRadius={3}
  size={4}
/>

CSS Variables

The component uses CSS variables for theming. Define these in your application:

:root {
  /* Icon stroke colors */
  --icon-stroke-color-primary: currentColor;
  --icon-stroke-color-default: currentColor;

  /* Content colors for status */
  --content-color-primary: #000;
  --content-color-success: #10b981;
  --content-color-error: #ef4444;
  --content-color-warning: #f59e0b;

  /* Sizes */
  --cell-height-1: 16px;
  --cell-height-2: 24px;
  --cell-height-3: 32px;
  --cell-height-4: 40px;

  /* Border radius */
  --border-radius-1: 4px;
  --border-radius-2: 8px;
  --border-radius-3: 12px;

  /* Icon stroke width */
  --icon-stroke-width-1: 1.5;
  --icon-stroke-width-2: 2;

  /* Animation */
  --animation-duration-1: 0.2s;
  --animation-easing-1: ease;
}

TypeScript

The component is fully typed. Import types as needed:

import Icon, { IconProps, IconNameType, StatusType } from 'nice-react-icon'

const MyComponent: React.FC = () => {
  const iconName: IconNameType = 'arrow'
  const status: StatusType = 'primary'

  return <Icon name={iconName} status={status} />
}

License

MIT © Nice Prototypes