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

@xbc/react-input-emoji

v5.0.1

Published

A React input with an option to add an emoji

Downloads

2

Readme

react-input-emoji

A React input with an option to pick emojis

NPM JavaScript Style Guide

About

InputEmoji provides a simple way to have an input element with emoji picker support. Click the picker button next to the input field and select an emoji from the popup window. Done!

Install

npm install --save react-input-emoji

Usage

After install import the react-input-emoji component to display your input with emoji support like so:

import React, { useState } from "react";
import InputEmoji from "react-input-emoji";

export default function Example() {
  const [text, setText] = useState("");

  function handleOnEnter(text) {
    console.log("enter", text);
  }

  return (
    <InputEmoji
      value={text}
      onChange={setText}
      cleanOnEnter
      onEnter={handleOnEnter}
      placeholder="Type a message"
    />
  );
}

Props

| Prop | Type | Default | Description | |----------------|----------|------------------|--------------------------------------------------------------------------------------------------------------------------| | value | string | "" | The input value. | | onChange | function | - | This function is called when the value of the input changes. The first argument is the current value. | | onResize | function | - | This function is called when the width or the height of the input changes. The first argument is the current size value. | | onClick | function | - | This function is called when the input is clicked. | | onFocus | function | - | This function is called when the input has received focus. | | cleanOnEnter | boolean | false | Clean the input value after the keydown event. | | onEnter | function | - | This function is called after the keydown event is fired with the keyCode === 13 returning the last value. | | placeholder | string | "Type a message" | Set the placeholder of the input. | | height | number | 40 | The total height of the area in which the element is rendered. | | maxLength | number | - | The maximum number of characters allowed in the element. | | theme | string | - | Set theme for emoji popup. Available values "light", "dark", "auto" | | borderRadius | number | 21 | The border radius of the input container. | | borderColor | string | "#EAEAEA" | The border color of the input container. | | fontSize | number | 15 | The font size of the placeholder and input container. | | fontFamily | string | "sans-serif" | The font family of the placeholder and input container. |

License

MIT © cesarwbr