1.0.0 • Published 6 years ago

material-ui-star-rating v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Material Rating

Build Status Greenkeeper badge

Example

See this component in action

Installation

npm i --save material-ui-rating

Usage

import { Rating } from 'material-ui-rating'

// ...
render() {
  return(
    <div>
        <Rating
          value={3}
          max={5}
          onChange={(value) => console.log(`Rated with value ${value}`)}
        />
    </div>
  )
}

Material Rating Properties

NameTypeDefaultDescription
classNamestringSets classname for IconButton component.
disabledbooleanfalseDisables the rating and gray it out if set to true.
iconClassNamestringSets classname for icon in IconButton Component.
iconFillednode<ToggleStar color={colors.orange500}/>This is the icon to be used as an icon in value range.
iconFilledRendererfuncOverrides filled icon renderer.
iconHoverednode<ToggleStarBorder color={colors.orange500}/>This is the icon to be used as an hovered icon.
iconHoveredRendererfuncOverrides hovered icon renderer.
itemIconStyleobjectOverride the inline-icon-styles of the item elements.
iconNormalnode<ToggleStarBorder color={colors.grey300}/>This is the icon to be used as an normal icon.
iconNormalRendererfuncOverrides normal icon renderer.
itemStyleobjectOverride the inline-styles of the item elements.
maxnumber5The max value of the rating bar.
onChangefunctionFired when a value is clicked.
readOnlybooleanfalseDon't allow input if set to true.
styleobjectOverride the inline-styles of the root element.
tooltipnodeSets tooltip for icon in IconButton Component.
tooltipPositionstringbottom-centerOverrides tooltip position.
tooltipRendererfuncOverrides tooltip renderer.
tooltipStylesobjectOverrides tooltip styles.
valuenumber0The value of the rating bar.

* required property

License

The files included in this repository are licensed under the MIT license.