# react-input-emoji-native

> A React input with an option to add an emoji

Latest version **4.1.6** (published 2022-03-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-input-emoji-native
pnpm add react-input-emoji-native
yarn add react-input-emoji-native
bun add react-input-emoji-native
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.1.6 |
| Published | 2022-03-02 |
| First published | 2022-01-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 1 |
| Unpacked size | 2.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | onuryilmazdev |
| Maintainers | camaronur |
| Keywords | emoji, react, input, picker |

## Links

- npm: https://www.npmjs.com/package/react-input-emoji-native
- npm.io page: https://npm.io/package/react-input-emoji-native

## Dependencies (1)

- [emoji-mart](https://npm.io/package/emoji-mart.md) 3.0.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 4.1.6 (latest) — 2022-03-02
- 4.1.5 — 2022-03-02
- 4.1.4 — 2022-03-02
- 4.1.3 — 2022-01-14
- 4.1.2 — 2022-01-14
- 4.1.1 — 2022-01-14
- 4.1.0 — 2022-01-14
- 4.0.9 — 2022-01-14

## README

# react-input-emoji-native

> A React input with an option to pick emojis

[![NPM](https://img.shields.io/npm/v/react-input-emoji-native.svg)](https://www.npmjs.com/package/react-input-emoji-native) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

<a href="https://github.com/onuryilmazdev/react-input-emoji-native/"><img width="500" src="https://cesarwbr.github.io/react-input-emoji/assets/images/screely-1566732641740.png" alt="Demo"></a>

## 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

```bash
npm install --save react-input-emoji-native
```

## Usage

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

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

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.                                                                 |
| `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 © [onuryilmaz](https://github.com/onuryilmazdev)

---
_Source: https://npm.io/package/react-input-emoji-native · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
