Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-simple-rating

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-rating

a pure and clean react component for your rating function

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

React-Rating

this is a really small and highly-extensible react-componenet made for your rating function

Usage

var Rating = require('react-simple-rating');

or

import Rating from 'react-simple-rating';

Examples

to check live example
npm run dev && open ./example/index.html
display-only
<Rating rating={3.43} displayOnly={true} />
functional
<Rating displayOnly={false} onSubmit={this.handleClick} />
arbitrary maxRating (but don't go too far)
<Rating displayOnly={false} maxRating={7} onSubmit={this.handleClick} />

however, if you go with too many symbols and lead to a line wrap, since it is based on RTL direction, it may not work as you expected (say 100 symbols)

custom unicode symbol
<Rating rating={3.43} displayOnly={true} ratingSymbol={'\u2764'} />
and yes, of course you can use your favorite icons from FontAwesome
<Rating rating={4.33} displayOnly={true} ratingSymbol={'\uf091'} />

Keywords

FAQs

Package last updated on 07 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc