npm.io
1.0.6 • Published 5 years ago

react-emoji-rating

Licence
MIT
Version
1.0.6
Deps
0
Size
895 kB
Vulns
0
Weekly
0
Stars
3

React-Emoji-Rating

A simple emoji rating component

JavaScript Style Guide

NPM

Install

npm install --save react-emoji-rating

Or yarn

yarn add react-emoji-rating

Emoji categories

  1. smileys

smileys


  1. emojiPeople

emo people


  1. emoticons

emoticons


  1. funky

funky


  1. classic (defalut)

classic


  1. blobs

blobs


Basic Usage

import React, { Component } from 'react'

import EmojiRating from 'react-emoji-rating'

export default class App extends Component {
 
  render () {
    return (
      <div>
        <EmojiRating 
          variant='classic'
          onChange={this.handleRating} />
      </div>
    )
  }
}

Options

Property Type Description
variant string Emoji category to be used
onChange func Called when the slider is moved with the silder value

Example

Example code for this simple component is available in the /example directory.

License

MIT HasiniWijerathna