# react-native-emoji-picker-staltz

> Simple emoji picker for react-native

Latest version **1.0.0** (published 2021-08-04) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-08-04 |
| First published | 2020-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 17 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Yonah Forst |
| Maintainers | staltz |
| Keywords | react-native, react-component, ios, emoji, emoji-picker |

## Links

- npm: https://www.npmjs.com/package/react-native-emoji-picker-staltz
- Repository: https://github.com/staltz/react-native-emoji-picker-staltz
- Homepage: https://github.com/staltz/react-native-emoji-picker
- Issues: https://github.com/staltz/react-native-emoji-picker/issues
- npm.io page: https://npm.io/package/react-native-emoji-picker-staltz

## Dependencies (5)

- [lodash.groupby](https://npm.io/package/lodash.groupby.md) ~4.6.0
- [lodash.orderby](https://npm.io/package/lodash.orderby.md) ~4.6.0
- [emoji-datasource](https://npm.io/package/emoji-datasource.md) ~5.0.1
- [lodash.mapvalues](https://npm.io/package/lodash.mapvalues.md) ~4.6.0
- [string.fromcodepoint](https://npm.io/package/string.fromcodepoint.md) ~0.2.1

## Recent versions

- 1.0.0 (latest) — 2021-08-04
- 0.2.2 — 2020-04-03

## README

## Emoji picker for React Native

**Forked from [yonahforst/react-native-emoji-picker](https://github.com/yonahforst/react-native-emoji-picker)**

The changes made from react-native-emoji-picker to **react-native-emoji-picker-staltz** are:

- Supports `rows: number` prop to specify number of rows used in the layout
- Supports **only** the modal-looking overlay
- Supports `onPressOutside` prop
- Supports customizing the names of the categories, with the prop `localizedCategories`
- Supports several styling props:
  - `modalStyle`
  - `backgroundStyle`
  - `containerStyle`
  - `scrollStyle`
  - `headerStyle`
  - `clearButtonStyle`
- Updated `emoji-datasource` to the latest version
- Implemented with FlatList, not a ScrollView with `setTimeout` hacks (this caused bugs with touchables)
- Implemented in TypeScript (so that a `.d.ts` file is provided)
- Calculates Android support (of each emoji) differently, based on the Android OS version and the "added_in" property of an Emoji
- Does not depend on the entire Lodash, depends on just 3 specific Lodash utils
- Does not depend on `prop-types`

## Installation

```
npm install --save react-native-emoji-picker-staltz
```

## Usage

This component is designed to be the **only child** of a `<Modal>` component, in full screen.

```jsx
import EmojiPicker from 'react-native-emoji-picker-staltz';

class Main extends React.Component {
  _emojiSelected(emoji) {
    console.log(emoji)
  }

  render() {
    return (
      <View style={styles.container}>
        <Modal visible={true} transparent={true}>
          <EmojiPicker
            onEmojiSelected={this._emojiSelected}
            rows={7}
            localizedCategories={[ // Always in this order:
              'Smileys and emotion',
              'People and body',
              'Animals and nature',
              'Food and drink',
              'Activities',
              'Travel and places',
              'Objects',
              'Symbols',
            ]}
            />
        </Modal>
      </View>
    );
  }
}
```

Props:

```typescript
type Props = {
  onEmojiSelected: (e: string | null) => void;
  onPressOutside?: () => void;
  rows?: number;
  localizedCategories?: Array<string>;
  hideClearButton?: boolean;
  emojiSize?: number;
  modalStyle?: ViewStyle;
  backgroundStyle?: ViewStyle;
  containerStyle?: ViewStyle;
  scrollStyle?: ViewStyle;
  headerStyle?: TextStyle;
  clearButtonStyle?: ViewStyle;
  clearButtonText?: string;
}
```

## License

Copyright (c) 2016 Yonah Forst

Modifications: Copyright (c) 2020 Andre 'Staltz' Medeiros

MIT

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