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

@metalmind/mm-emoji

v0.1.0

Published

A lightweight, stylable, reusable React emoji picker component inspired by Slack's emoji picker

Readme

@metalmind/mm-emoji

A lightweight, stylable, reusable React emoji picker component inspired by Slack's emoji picker.

npm version License: MIT

Features

  • 🎨 Fully Styled - Beautiful default styling with light and dark themes
  • 🔍 Search - Real-time emoji search with keyword matching
  • 📝 Recently Used - Automatically tracks recently used emojis
  • Frequently Used - Shows your most-used emojis
  • 🎨 Skin Tones - Full support for skin tone variants
  • ⌨️ Keyboard Navigation - Full keyboard support (coming soon)
  • Accessible - WCAG compliant with proper ARIA labels
  • 📦 Lightweight - Small bundle size with tree-shaking support
  • 🎯 TypeScript - Full TypeScript support with type definitions
  • 🔧 Customizable - Extensive styling and behavior customization

Installation

npm install @metalmind/mm-emoji

Or with yarn:

yarn add @metalmind/mm-emoji

Or with pnpm:

pnpm add @metalmind/mm-emoji

Quick Start

import { EmojiPicker, EmojiData } from '@metalmind/mm-emoji';
import { useState } from 'react';

function App() {
  const [selectedEmoji, setSelectedEmoji] = useState<string>('');
  const [showPicker, setShowPicker] = useState(false);

  const handleEmojiSelect = (emoji: EmojiData) => {
    setSelectedEmoji(emoji.emoji);
    setShowPicker(false);
  };

  return (
    <div>
      <button onClick={() => setShowPicker(!showPicker)}>
        {selectedEmoji || 'Select Emoji'}
      </button>

      {showPicker && (
        <EmojiPicker onEmojiSelect={handleEmojiSelect} />
      )}
    </div>
  );
}

API Reference

Props

Required Props

| Prop | Type | Description | |------|------|-------------| | onEmojiSelect | (emoji: EmojiData) => void | Callback function called when an emoji is selected |

Optional Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | presetEmoji | string \| EmojiData | - | Initial emoji to highlight in the picker | | theme | 'light' \| 'dark' \| 'auto' | 'light' | Color theme for the picker | | width | number \| string | 376 | Width of the picker (px or CSS value) | | height | number \| string | 435 | Height of the picker (px or CSS value) | | className | string | '' | Additional CSS class name | | styles | EmojiPickerStyles | {} | Style overrides for different parts | | autoFocus | boolean | true | Auto-focus search input on mount | | showPreview | boolean | true | Show emoji preview on hover | | showSkinTones | boolean | true | Enable skin tone picker | | enableFrequentlyUsed | boolean | true | Show frequently used section | | maxFrequentRows | number | 2 | Maximum rows for frequently used emojis | | storageKey | string | 'mm-emoji' | localStorage key prefix | | customStorage | StorageAdapter | - | Custom storage implementation | | searchPlaceholder | string | 'Search emojis...' | Search input placeholder text | | searchDebounce | number | 300 | Search debounce delay (ms) |

Types

interface EmojiData {
  emoji: string;              // The actual emoji character
  name: string;               // Display name
  shortcode: string;          // :shortcode: format
  unicode: string;            // Unicode codepoint(s)
  category: string;           // Category name
  keywords: string[];         // Search keywords
  skinTone?: number;          // Skin tone variant
  supportsSkinTone?: boolean; // Whether supports skin tones
}

interface EmojiPickerStyles {
  picker?: React.CSSProperties;
  search?: React.CSSProperties;
  categories?: React.CSSProperties;
  emojiGrid?: React.CSSProperties;
  preview?: React.CSSProperties;
  skinTonePicker?: React.CSSProperties;
}

Usage Examples

Basic Usage

import { EmojiPicker } from '@metalmind/mm-emoji';

<EmojiPicker onEmojiSelect={(emoji) => console.log(emoji.emoji)} />

With Preset Emoji

<EmojiPicker
  onEmojiSelect={handleSelect}
  presetEmoji="😀"
/>

Dark Theme

<EmojiPicker
  onEmojiSelect={handleSelect}
  theme="dark"
/>

Auto Theme (System Preference)

<EmojiPicker
  onEmojiSelect={handleSelect}
  theme="auto"
/>

Custom Size

<EmojiPicker
  onEmojiSelect={handleSelect}
  width={400}
  height={500}
/>

Custom Styling

<EmojiPicker
  onEmojiSelect={handleSelect}
  styles={{
    picker: {
      borderRadius: '16px',
      boxShadow: '0 8px 32px rgba(0,0,0,0.1)',
    },
    search: {
      backgroundColor: '#f0f0f0',
    },
  }}
/>

Without Preview

<EmojiPicker
  onEmojiSelect={handleSelect}
  showPreview={false}
/>

Custom Storage

import { StorageAdapter } from '@metalmind/mm-emoji';

const customStorage: StorageAdapter = {
  getItem: (key) => {
    // Your custom get logic
    return sessionStorage.getItem(key);
  },
  setItem: (key, value) => {
    // Your custom set logic
    sessionStorage.setItem(key, value);
  },
  removeItem: (key) => {
    sessionStorage.removeItem(key);
  },
};

<EmojiPicker
  onEmojiSelect={handleSelect}
  customStorage={customStorage}
/>

Theming

The component supports extensive theming via CSS variables:

:root {
  --emoji-picker-bg: #ffffff;
  --emoji-picker-border: #e0e0e0;
  --emoji-picker-text: #1d1c1d;
  --emoji-picker-text-secondary: #616061;
  --emoji-picker-hover: #f0f0f0;
  --emoji-picker-active: #1264a3;
  --emoji-picker-shadow: rgba(0, 0, 0, 0.1);
  --emoji-picker-radius: 8px;
}

Browser Support

  • Chrome 90+
  • Firefox 88+
  • Safari 14+
  • Edge 90+

Development

# Install dependencies
npm install

# Run development mode
npm run dev

# Build library
npm run build

# Run tests
npm test

# Run linter
npm run lint

# Format code
npm run format

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT © Metalmind AB

Links

Acknowledgments

  • Inspired by Slack's emoji picker
  • Emoji data from unicode-emoji-json
  • Built with React, TypeScript, and Vite