Code Monkey home page Code Monkey logo

react-star-rating-input's Introduction

Build Status

About

React.js components for entering 0—N stars (N is 5 by default), or displaying 0—N stars. See the demo.

It's published to npm compiled to ES5, and should work in IE11, if Promise gets polyfilled.

Installation

npm install --save react-star-rating-input

The two main exports are: {StarRatingInput, StarRating}. The former is for an interactive input control, the latter is for passive star rating display. Star rasters and CSS is exported as the {css} string.

Usage

See the code of the demo mentioned above.

StarRatingInput props

Static layout

  • size — how many stars to display. The default value is 5

Interaction

  • value — how many stars are selected
  • onChange: (value: number) => void — your value change handler

StarRating props

  • value — how many stars are displayed

react-star-rating-input's People

Contributors

ctan1345 avatar greenkeeperio-bot avatar ikr 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

Watchers

 avatar  avatar  avatar  avatar  avatar

react-star-rating-input's Issues

Provide a non-interactive prop

<StarRatingInput interactive={false} />

Say User A inputs a rating of 3 stars using this input. It would be nice to be able to display 3 stars as User A's rating to User B, and not allow User B to change the stars shown on hover.

demo page isn't working

https://ikr.su/h/react-star-rating-input/demo.html
[Error] ReferenceError: Can't find variable: Intl
(anonymous function) (bundle.js, line 1)
s (bundle.js, line 1)
(anonymous function) (bundle.js, line 1)
(anonymous function) (bundle.js, line 1)
s (bundle.js, line 1)
(anonymous function) (bundle.js, line 1)
(anonymous function) (bundle.js, line 1)
(anonymous function) (bundle.js, line 1)
s (bundle.js, line 1)
(anonymous function) (bundle.js, line 1)
(anonymous function) (bundle.js, line 1)
(anonymous function) (bundle.js, line 1)
(anonymous function) (bundle.js, line 1)
s (bundle.js, line 1)
e (bundle.js, line 1)
global code (bundle.js, line 1)

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.