Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ultimateakash/react-rating-emoji

An animated emoji rating component
https://github.com/ultimateakash/react-rating-emoji

emoji-rating-component react-rating-emoji

Last synced: 9 days ago
JSON representation

An animated emoji rating component

Awesome Lists containing this project

README

        

# react-rating-emoji

> An animated emoji rating component

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

## Install

```bash
npm install --save react-rating-emoji
```

## Usage

```jsx
import React, { useState } from 'react'

import { RatingComponent } from 'react-rating-emoji'
import 'react-rating-emoji/dist/index.css'

const App = () => {
const [rating, setRating] = useState(0);

const handleRating = (newRating) => {
setRating(newRating);
}

return
}

export default App

```
## Props
| prop | Type | Default | Required | Description |
| ------------- | ------------- | ------------- | ------------- | ------------- |
| rating | `number` | 0 | no | current rating
| onClick | `event` | | no | event handler `(rating)`
| className | `string` | | no | container class name
| id | `string` | emoji-container | no | container id name
## License

MIT © [https://github.com/ultimateakash](https://github.com/https://github.com/ultimateakash)