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

material-ui-rating

Package Overview
Dependencies
Maintainers
4
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material-ui-rating

Material style rating

  • 4.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
424
increased by23.26%
Maintainers
4
Weekly downloads
 
Created
Source

Material-UI Rating

JavaScript Style Guide Build Status

Example

Installation

Stable channel

npm install material-ui-rating@next

Usage

import Rating from 'material-ui-rating'

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

Material Rating Properties

NameTypeDefaultDescription
classes*objectUseful to extend the style applied to components. The accepted keys are listed below.
componentelementTypedivThe component used for the root node. Either a string to use a DOM element or a component.
disabledboolfalseDisables the rating and gray it out if set to true.
disableHoverboolfalseDisable hover effects if set to true.
iconFillednodeThis is the icon to be used as an icon in value range.
iconFilledRendererfuncOverrides filled icon renderer.
iconHoveredRendererfuncOverrides hovered icon renderer.
iconHoverednodeThis is the icon to be used as an hovered icon.
iconNormalnodeThis is the icon to be used as an normal icon.
iconNormalRendererfuncOverrides normal icon renderer.
maxnumber5The max value of the rating bar.
onChangefuncFired when a value is clicked.
readOnlyboolfalseDon't allow input if set to true.
valuenumber0The value of the rating bar.

* required property

CSS API

You can override all the class names injected by Material-UI-Rating thanks to the classes property. This property accepts the following keys:

  • root - Applied to the root div element
  • iconButton - Applied to the IconButton component
  • icon - Applied to the SvgIcon component
  • disabled - Applied to the IconButton component when disabled prop is true
  • readOnly - Applied to the IconButton component when readOnly prop is true

RTL support

Following Material-UI's conventions, this package respects theme.direction.rtl, so right-to-left support works out-of-the-box.

License

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

Keywords

FAQs

Package last updated on 14 Aug 2019

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