GithubHelp home page GithubHelp logo

missive / emoji-mart Goto Github PK

View Code? Open in Web Editor NEW
8.1K 38.0 788.0 55.48 MB

πŸͺ One component to pick them all

Home Page: https://missiveapp.com/open/emoji-mart

License: MIT License

JavaScript 12.41% HTML 22.93% SCSS 15.39% TypeScript 49.27%
emoji-picker emoji react component picker emoticons twemoji missive

emoji-mart's Introduction


Emoji Mart is a customizable
emoji picker HTML component for the web
Demo

EmojiMart

Missive | Team email, team chat, team tasks, one app
Brought to you by the Missive team

πŸ“– Table of Contents

πŸ’Ύ Data

Data required for the picker to work has been completely decoupled from the library. That gives developers the flexibility to better control their app bundle size and let them choose how and when this data is loaded. Data can be:

Bundled directly into your codebase

  • Pros: Picker renders instantly, data is available offline
  • Cons: Slower initial page load (bigger file to load)
yarn add @emoji-mart/data
import data from '@emoji-mart/data'
import { Picker } from 'emoji-mart'

new Picker({ data })

Fetched remotely

  • Pros: Data fetched only when needed, does not affect your app bundle size
  • Cons: Network latency, doesn’t work offline (unless you configure a ServiceWorker)
import { Picker } from 'emoji-mart'
new Picker({
  data: async () => {
    const response = await fetch(
      'https://cdn.jsdelivr.net/npm/@emoji-mart/data',
    )

    return response.json()
  }
})

In this example data is fetched from a content delivery network, but it could also be fetched from your own domain if you want to host the data.

πŸͺ Picker

React

npm install --save emoji-mart @emoji-mart/data @emoji-mart/react
import data from '@emoji-mart/data'
import Picker from '@emoji-mart/react'

function App() {
  return (
    <Picker data={data} onEmojiSelect={console.log} />
  )
}

Browser

<script src="https://cdn.jsdelivr.net/npm/emoji-mart@latest/dist/browser.js"></script>
<script>
  const pickerOptions = { onEmojiSelect: console.log }
  const picker = new EmojiMart.Picker(pickerOptions)

  document.body.appendChild(picker)
</script>

Options / Props

Option Default Choices Description
data {} Data to use for the picker
i18n {} Localization data to use for the picker
categories [] frequent, people, nature, foods, activity, places, objects, symbols, flags Categories to show in the picker. Order is respected.
custom [] Custom emojis
onEmojiSelect null Callback when an emoji is selected
onClickOutside null Callback when a click outside of the picker happens
onAddCustomEmoji null Callback when the Add custom emoji button is clicked. The button will only be displayed if this callback is provided. It is displayed when search returns no results.
autoFocus false Whether the picker should automatically focus on the search input
categoryIcons {} Custom category icons
dynamicWidth false Whether the picker should calculate perLine dynamically based on the width of <em-emoji-picker>. When enabled, perLine is ignored
emojiButtonColors [] i.e. #f00, pink, rgba(155,223,88,.7) An array of color that affects the hover background color
emojiButtonRadius 100% i.e. 6px, 1em, 100% The radius of the emoji buttons
emojiButtonSize 36 The size of the emoji buttons
emojiSize 24 The size of the emojis (inside the buttons)
emojiVersion 14 1, 2, 3, 4, 5, 11, 12, 12.1, 13, 13.1, 14 The version of the emoji data to use. Latest version supported in @emoji-mart/data is currently 14
exceptEmojis [] List of emoji IDs that will be excluded from the picker
icons auto auto, outline, solid The type of icons to use for the picker. outline with light theme and solid with dark theme.
locale en en, ar, be, cs, de, es, fa, fi, fr, hi, it, ja, ko, nl, pl, pt, ru, sa, tr, uk, vi, zh The locale to use for the picker
maxFrequentRows 4 The maximum number of frequent rows to show. 0 will disable frequent category
navPosition top top, bottom, none The position of the navigation bar
noCountryFlags false Whether to show country flags or not. If not provided, tbhis is handled automatically (Windows doesn’t support country flags)
noResultsEmoji cry The id of the emoji to use for the no results emoji
perLine 9 The number of emojis to show per line
previewEmoji point_up The id of the emoji to use for the preview when not hovering any emoji. point_up when preview position is bottom and point_down when preview position is top.
previewPosition bottom top, bottom, none The position of the preview
searchPosition sticky sticky, static, none The position of the search input
set native native, apple, facebook, google, twitter The set of emojis to use for the picker. native being the most performant, others rely on spritesheets.
skin 1 1, 2, 3, 4, 5, 6 The emojis skin tone
skinTonePosition preview preview, search, none The position of the skin tone selector
theme auto auto, light, dark The color theme of the picker
getSpritesheetURL null A function that returns the URL of the spritesheet to use for the picker. It should be compatible with the data provided.

Custom emojis

You can use custom emojis by providing an array of categories and their emojis. Emojis also support multiple skin tones and can be GIFs or SVGs.

import data from '@emoji-mart/data'
import Picker from '@emoji-mart/react'

const custom = [
  {
    id: 'github',
    name: 'GitHub',
    emojis: [
      {
        id: 'octocat',
        name: 'Octocat',
        keywords: ['github'],
        skins: [{ src: './octocat.png' }],
      },
      {
        id: 'shipit',
        name: 'Squirrel',
        keywords: ['github'],
        skins: [
          { src: './shipit-1.png' }, { src: './shipit-2.png' }, { src: './shipit-3.png' },
          { src: './shipit-4.png' }, { src: './shipit-5.png' }, { src: './shipit-6.png' },
        ],
      },
    ],
  },
  {
    id: 'gifs',
    name: 'GIFs',
    emojis: [
      {
        id: 'party_parrot',
        name: 'Party Parrot',
        keywords: ['dance', 'dancing'],
        skins: [{ src: './party_parrot.gif' }],
      },
    ],
  },
]

function App() {
  return (
    <Picker data={data} custom={custom} />
  )
}

Custom category icons

You can use custom category icons by providing an object with the category name as key and the icon as value. Currently supported formats are svg string and src. See example.

const customCategoryIcons = {
  categoryIcons: {
    activity: {
      svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M57.89 397.2c-6.262-8.616-16.02-13.19-25.92-13.19c-23.33 0-31.98 20.68-31.98 32.03c0 6.522 1.987 13.1 6.115 18.78l46.52 64C58.89 507.4 68.64 512 78.55 512c23.29 0 31.97-20.66 31.97-32.03c0-6.522-1.988-13.1-6.115-18.78L57.89 397.2zM496.1 352c-44.13 0-79.72 35.75-79.72 80s35.59 80 79.72 80s79.91-35.75 79.91-80S540.2 352 496.1 352zM640 99.38c0-13.61-4.133-27.34-12.72-39.2l-23.63-32.5c-13.44-18.5-33.77-27.68-54.12-27.68c-13.89 0-27.79 4.281-39.51 12.8L307.8 159.7C262.2 192.8 220.4 230.9 183.4 273.4c-24.22 27.88-59.18 63.99-103.5 99.63l56.34 77.52c53.79-35.39 99.15-55.3 127.1-67.27c51.88-22 101.3-49.87 146.9-82.1l202.3-146.7C630.5 140.4 640 120 640 99.38z"/></svg>',
    },
    people: {
      src: './people.png',
    },
  },
}

πŸ™ƒ Emoji component

The emoji web component usage is the same no matter what library you use.

First, you need to make sure data has been initialized. You need to call this only once per page load. Note that if you call init like this, you don’t necessarily need to include data in your Picker props. It doesn’t hurt either, it will noop.

import data from '@emoji-mart/data'
import { init } from 'emoji-mart'

init({ data })

Then you can use the emoji component in your HTML / JSX.

<em-emoji id="+1" size="2em"></em-emoji>
<em-emoji id="+1" skin="2"></em-emoji>
<em-emoji shortcodes=":+1::skin-tone-1:"></em-emoji>
<em-emoji shortcodes=":+1::skin-tone-2:"></em-emoji>

Attributes / Props

Attribute Example Description
id +1 An emoji ID
shortcodes :+1::skin-tone-2: An emoji shortcode
native πŸ‘ A native emoji
size 2em The inline element size
fallback :shrug: A string to be rendered in case the emoji can’t be found
set native The emoji set: native, apple, facebook, google, twitter
skin 1 The emoji skin tone: 1, 2, 3, 4, 5, 6

πŸ•΅οΈβ€β™€οΈ Headless search

You can search without the Picker. Just like the emoji component, data needs to be initialized first in order to use the search index.

import data from '@emoji-mart/data'
import { init, SearchIndex } from 'emoji-mart'

init({ data })

async function search(value) {
  const emojis = await SearchIndex.search(value)
  const results = emojis.map((emoji) => {
    return emoji.skins[0].native
  })

  console.log(results)
}

search('christmas') // => ['πŸŽ„', 'πŸ‡¨πŸ‡½', 'πŸ§‘β€πŸŽ„', 'πŸ””', '🀢', '🎁', 'β˜ƒοΈ', '❄️', 'πŸŽ…', 'β›„']

πŸ”¬ Get emoji data from native

You can get emoji data from a native emoji. This is useful if you want to get the emoji ID from a native emoji. Just like the emoji component, data needs to be initialized first in order to retrieve the emoji data.

import data from '@emoji-mart/data'
import { init, getEmojiDataFromNative } from 'emoji-mart'

init({ data })

getEmojiDataFromNative('🀞🏿').then(console.log)
/* {
  aliases: ['hand_with_index_and_middle_fingers_crossed'],
  id: 'crossed_fingers',
  keywords: ['hand', 'with', 'index', 'and', 'middle', 'good', 'lucky'],
  name: 'Crossed Fingers',
  native: '🀞🏿',
  shortcodes: ':crossed_fingers::skin-tone-6:',
  skin: 6,
  unified: '1f91e-1f3ff',
} */

πŸ—Ί Internationalization

EmojiMart UI supports multiple languages, feel free to open a PR if yours is missing.

import i18n from '@emoji-mart/data/i18n/fr.json'
i18n.search_no_results_1 = 'Aucun emoji'

new Picker({ i18n })

Given the small file size, English is built-in and doesn’t need to be provided.

πŸ“š Examples

πŸ€“ Built for modern browsers

EmojiMart relies on these APIs, you may need to include polyfills if you need to support older browsers:

πŸ›  Development

yarn install
yarn dev

emoji-mart's People

Contributors

abolfazl-talaei avatar airani avatar akirarika avatar ashusharmasigdev avatar bennetfabian avatar charca avatar clebal avatar cmunozgar avatar dependabot[bot] avatar etiennelem avatar fnrdev avatar fullyalive avatar jwhitham-ds avatar kiruba56 avatar kyle-go avatar masoud-msk avatar miszo avatar patphantuan251 avatar phnessu4 avatar potty avatar santiagendrix avatar scalahansolo avatar staniel359 avatar the-fukui avatar tranquilmarmot avatar twilightcoder avatar vemonet avatar yasmincastro avatar zertz avatar zhouzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emoji-mart's Issues

Smoother transition between categories

I think there's an opportunity for smoother transitions between categories. Namely:

  1. The bottom border under the category icons can animate left/right, as opposed to a jump
  2. The picker can smoothly scroll up/down as the category icons are clicked, as opposed to a jump

Cannot find module "React"

When I install de component and run it, I get the following error:

image

I can fix it changing the dist file on node_modules, from "React" to "react":

(function webpackUniversalModuleDefinition(root, factory) {
    if(typeof exports === 'object' && typeof module === 'object')
        module.exports = factory(require("react"));
    else if(typeof define === 'function' && define.amd)
        define(["React"], factory);
    else if(typeof exports === 'object')
        exports["EmojiMart"] = factory(require("react"));
    else
        root["EmojiMart"] = factory(root["react"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_3__) {

I'm using create-react-app boilerplate to create the app.

How replace emoji codes in html to Emoji Component?

Hello,

I want to display the Emoji Component like bellow but I don't know how can I replace the html result with component like:

Can you help me with this please?

Thank you.

I get html like this

Hello, how are you? :thumbsup:

I would like to get something like this:

Hello, how are you? <Emoji emoji=':thumbsup:'  size={64} />

Error if the emoji doesn't exist

Hi guys

I tried to use the Emoji component with an emoji that doesn't exist.

For instance, with :thumbsup:, it doesn't work :

<Emoji
          key={i}
          sheetURL={'/images/sheet_apple_32.png'}
          emoji={{ id: 'thumbsup', skin: 3 }}
          size={20}
        />

I have this error in the console :

emoji-mart.js?78ec:1041
Uncaught TypeError: Cannot read property 'skin_variations' of undefined

Better search results sorting

Currently I guess the results are just arbitrarily sorted, correct? Here are a few things we should do:

  • List emojis starting with the search query first, so ok_hand appears first here:

screen shot 2016-07-26 at 11 22 36

- Then show results with a matching _short name_ before results with matching _keywords_, so co**ok**ed_rice appears before no_mouth:

screen shot 2016-07-26 at 11 30 29

- Then, sort based on alphanum order, rather than no order.

Custom Emoji Option Idea

An idea to implement a custom emoji.


{
  name : "Github Icons", 
  icons : [{
  tag:'hello',
  title:'Hello Icon',
 url : 'http://emoji url.png'
},{..},{..}]
} 

Grab-bag of miscellaneous possible improvements

For my own project I have forked emoji-mart (which is totally awesome!) with the following miscellaneous improvements. If there is demand to put any of these improvements into emoji-mart I would be happy to file PRs πŸ‘ .

  • Frequently used default
  • Smoother anchor bar transitions
  • Search bar fixed at the top (similar to Slack)
  • Search bar icon (similar to Slack)
  • Clear search functionality
  • Permanent scrollbar (on Chrome)
  • Click on preview icon to toggle skin tone picker
  • Prettier .emoji:hover CSS (similar to Slack)
  • Misc CSS cleanups

Can't load css

I was try this package, but when i add <Picker set='emojione' /> the css seems not loaded
screenshot from 2016-11-22 14-12-44

what should i do so I can use this package ?
thanks

How to download spritesheet from custom URL as in earlier versions

I want to download a low quality spritesheet to consume low bandwidth for slow connections, it was there in earlier version but looks like its been removed. Now the _64.png starts downloading itself which are quite large files.
Is there anyway if I can customize it??

ChangeLog

Having ChangeLog is very important for every open-source project. Here is main reasons: keepachangelog.com.

For example, I found 0.5 release. It is major release. Is it safe to update? Commits could not answer me, because I am not familiar with project’s internal architecture. So I can miss important changes.

@EtienneLem for example, all my open source projects (Autoprefixer, PostCSS) always have ChangeLog :)

Some emoticons not working on firefox.

There are emojis not rendering properly on firefox. The native part of emoji object that is return from library emoji.native is not showing the right value if firefox. And even I store that value in my database and render in push notifications it is not showing correct preview.

Some images are below:

imageedit_3_4817967686
imageedit_14_5883324768

The dark background disappear totally.

It would be great if you can help me to resolve it :).

Request: Return URL of emoji (Twemoji)

Is there a way to get the URL to the image asset from emoji-mart?

Since onClick doesn't return it, but perhaps there's a util function I'm not seeing?

I'll take a stab at a PR if someone can point me in the right direction.

Prop onOutsideClick

Hey, guys! Thanks for nice picker! How about add prop for handle outside click? It would be useful if user want to hide component on outside click.

What do you think?

Return an Emoji by its code instead of name

Hey guys!

Is it possible to return an <Emoji /> by its html entity or utf code or in a way different than its name?

I mean by that something like <Emoji emoji="1f600" /> for the grinning emoji, for example.

Thanks!

can this be used in non-React based projects?

Thanks for the module.

This is perhaps the best picker out there.

Can this be used with non-React based projects? I can include React files in my project if thats really needed.

Support for incompatible React

Today, i add emoji-mart to my project. I get the conflict React with following message:

addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's render method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).

What should i do to resolve this problem?
Thanks you so much!

React DOM tree root should always have a node reference

Hello,

I have an error when I use a category and I click on a smiley:

Uncaught Error: React DOM tree root should always have a node reference.
at invariant (bundle.js?v=1:10302)
at Object.getNodeFromInstance (bundle.js?v=1:15812)
at Object.didPutListener (bundle.js?v=1:29212)
at Object.putListener (bundle.js?v=1:14889)
at Object.putListener (bundle.js?v=1:23009)
at CallbackQueue.notifyAll (bundle.js?v=1:17958)
at ReactReconcileTransaction.close (bundle.js?v=1:27837)
at ReactReconcileTransaction.closeAll (bundle.js?v=1:18329)
at ReactReconcileTransaction.perform (bundle.js?v=1:18276)
at ReactUpdatesFlushTransaction.perform (bundle.js?v=1:18263)

Do you have a solution ?

Thank you

PS : "react": "latest"

Data file unnecessarily large

The npm package takes up just over half a meg, but most of it is actually the data file, which is about 500k. I was able to get this down to half the size (250k) by pruning unnecessary quotes "" around the keys and changing all the long key names to shorter, one letter keys.

Thoughts on changing the data file to make the package smaller?

Support for React SSR

Hi, nice component, but it does not seem to work with React server-side rendering, as it uses the window object, which is only available on the client.

ReferenceError: window is not defined
  at Object.get (/node_modules/emoji-mart/dist/emoji-mart.js:919:28)
  at Object.defineProperty.value (/node_modules/emoji-mart/dist/emoji-mart.js:865:35)
  at __webpack_require__ (/node_modules/emoji-mart/dist/emoji-mart.js:30:30)
  at Object.defineProperty.value (/node_modules/emoji-mart/dist/emoji-mart.js:609:20)
  at __webpack_require__ (/node_modules/emoji-mart/dist/emoji-mart.js:30:30)
  at Object.defineProperty.value (/node_modules/emoji-mart/dist/emoji-mart.js:116:18)
  at __webpack_require__ (/node_modules/emoji-mart/dist/emoji-mart.js:30:30)
  at Object.defineProperty.value /node_modules/emoji-mart/dist/emoji-mart.js:64:20)
  at __webpack_require__ (/node_modules/emoji-mart/dist/emoji-mart.js:30:30)
  at Object.defineProperty.value (/node_modules/emoji-mart/dist/emoji-mart.js:50:18)

Default "Frequently Used"

Slack has a set of default frequently used icons. On Emoji mart the first time you load the picker (or clear localstorage) the frequently used is empty. This is confusing because the "Frequently Used" icon is selected in the top-left corner in the menu bar.

screen shot 2017-04-19 at 11 35 22

Block-scoped declaration

emoji-mart/scripts/build-data.js:97
  for (let key in datum) {
       ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

React > 15.5 deprecating React.Proptypes

React is moving proptypes to a separate package in version 16 and in the meantime logging warnings. PropTypes are being used directly in various components currently causing the following warning Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.

Split out emoji library from emoji picker. πŸ‘»

Just want to get a comment form the emoji-mart contributors.

I'm going to work on a fork that will split out using Higher Order Components the rendering of the emoji-picker and the datasource.

At present, they are all bundled together, the picker imports directly the generate data.js file. However, I believe this complicates the the release cycle as often the underlying dataset will change more than the picker does.

Secondly, in my use case, the application uses the emoji dataset elsewhere. For example, in an rich text editor autocomplete. And in string replace to replace emoji with images when viewed on a older platform, or Windows. So it doesn't make sense to have two copies of the emoji library.

Since making the changes required would likely result in an API change I wanted to get a feel for comments first before I started, especially related to component naming.

Something like:

Works as normal, uses localstorage and internal data library.

<Picker />

Picker would just wrap the SimplePicker and provide it with the internal data and localstorage functions. However, my application could consume the lower level component directly, which I've called SimplePicker which would expect the storage/dataset functions to be injected into it.

const data = application.loadEmojiDataLib();
const saveSkinTone = skinTone => application.storeUserPreference({ skinTone });

<SimplePicker data={data} onSkinTonePreferenceChange={saveSkinTone} />

This means that by referencing only the SimplePicker, webpack would not bundle the included emoji dataset in my application code.

Thoughts / comments? πŸ’¬

100% width

Is there a way I can make the width fluid? I need to implement this to a responsive layout.

Can't run npm install on project

Hi! I've just forked your repo, in order to change the resulting Emoji component from two span's, to a img with background.

I've already done it on the dist file and I'm using on my project, but I would like to create a PR for you. The emojis works better as img instead of span in a contenteditable div.

The problem npm is not able to install it.. Any ideas?
image

I18n support

Thanks for picker, it is awesome!

We are integrating to Russian website and want to translate categories and other texts (like Search placeholder). I didn’t find a way to do it.

Is is possible or we need to extend API?

category images not taking proper height in IE

There seems to be an issue that category(SVG) images are not taking height and width as given in the SVG viewport.
The SVG i.e category images takes a greater height.

I even found the fix that max-height can be given to images so that in case they dont take height from SVG viewport then it can be a rescue. It looks like max-width: 18px is given but not max-height

Do you want me to create a pull request that fixes the height of category images?

Getting error when using in create-react-app after building

Hi
I'm trying to use emoji-mart in the project built with create-react-app, it is working fine in development but while running the production build it is showing the following error
Uncaught TypeError: Cannot read property 'custom' of undefined at n (http://localhost:5000/static/js/main.4be574a7.js:1:788065) at r (http://localhost:5000/static/js/main.4be574a7.js:1:125795) at e (http://localhost:5000/static/js/main.4be574a7.js:1:126162) at http://localhost:5000/static/js/main.4be574a7.js:1:121536 at Array.map (native) at a.value (http://localhost:5000/static/js/main.4be574a7.js:1:121503) at r._renderValidatedComponentWithoutOwnerOrContext (http://localhost:5000/static/js/main.4be574a7.js:1:848718) at r._renderValidatedComponent (http://localhost:5000/static/js/main.4be574a7.js:1:848845) at r.performInitialMount (http://localhost:5000/static/js/main.4be574a7.js:1:844684) at r.mountComponent (http://localhost:5000/static/js/main.4be574a7.js:1:843730)

and nothing is showed on screen

Weird Display

Hi there - Whenever I import the component any where into my app it displays very strange. Can you shed some light on this for me?

http://imgur.com/a/fl9Oz

Here is my component code:

<Picker 
    emojiSize={24} 
    sheetSize={64} 
    color='#39BFD4' 
    perLine={16} 
    skin={1} 
    native={false} 
    set='emojione' 
    onClick={ (emoji)=> console.log(emoji) } 
/> 

Strange thing is the color doesn't even change for the main icons above the search.
I am using React v15.4.1

Any help would be greatly appreciated. Thanks

More stylish scroll bar

A few points of comparison between emoji mart and Slack:

screen shot 2017-04-06 at 22 56 06

  1. The scrollbar is shown permanently
  2. It is styled beautifully
  3. It starts below the search box, unlike emoji mart

A couple of suggestions for the search bar

Emoji mart is awesome. Two suggestions for the search bar:

  1. Add a magnifying glass icon, just like Slack

screen shot 2017-04-06 at 22 53 07

  1. Add a cross icon when there is text in the search bar, to clear the text.

screen shot 2017-04-06 at 22 54 49

Return an IMG element instead of a SPAN

Hi there guys!

First of all, thanks for the awesome work with emoji-mart! I just realized the component returns
something like this for the grinning emoji, for example:

<span class="emoji-mart-emoji"><span style="width: 24px; height: 24px; display: inline-block; background-image: url(&quot;https://unpkg.com/[email protected]/sheet_google_64.png&quot;); background-size: 4100%; background-position: 65% 37.5%;"></span></span>

Is there any possiblity to specify what type of element we would receive as return of the <Emoji /> component? For example, transforming the <span><span/></span> to a single <img /> element solved a few problems with my implementation!

Or to make it simpler: is there any way to setup the <Emoji /> to return an <img /> instead of a couple of spans?

EDIT: or the data that will compose the emoji? Like the BG position and stuff?

Thanks a lot guys! <3

Using exclude breaks search

  <Picker exclude={['nature', 'activity', 'objects', 'flags', 'places', 'symbols', 'custom']} />

Results in Uncaught TypeError: Cannot read property 'sort' of undefined

Secondary alias not used

Hi guys,

One on my favorite emoji is :thumbsup:. When I use the Picker, it says that I can use :+1: :thumbsup: but only :+1: works. Do you have any idea why the second alias doesn't work?

Thanks

Add No emoji found to i18n

Hey guys!

Thanks for the Picker: it is absolutely amazing! How about adding the "No Emoji Found" to the i18n object, so we can customize it as well?

What do you guys think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.