Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ultimateakash/react-rating-emoji
- Owner: ultimateakash
- Created: 2022-04-03T01:10:51.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-20T08:57:26.000Z (7 months ago)
- Last Synced: 2024-10-29T01:21:48.455Z (16 days ago)
- Topics: emoji-rating-component, react-rating-emoji
- Language: CSS
- Homepage: https://www.npmjs.com/package/react-rating-emoji
- Size: 822 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
## LicenseMIT © [https://github.com/ultimateakash](https://github.com/https://github.com/ultimateakash)