{"id":26215835,"url":"https://github.com/dreyescat/react-rating","last_synced_at":"2025-05-15T13:08:41.539Z","repository":{"id":1082779,"uuid":"39350983","full_name":"dreyescat/react-rating","owner":"dreyescat","description":"A rating react component with custom symbols.","archived":false,"fork":false,"pushed_at":"2023-01-04T21:45:06.000Z","size":6280,"stargazers_count":517,"open_issues_count":23,"forks_count":94,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-14T02:35:09.179Z","etag":null,"topics":["rating-component","react"],"latest_commit_sha":null,"homepage":"http://dreyescat.github.io/react-rating/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dreyescat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-19T22:19:58.000Z","updated_at":"2025-05-05T14:45:53.000Z","dependencies_parsed_at":"2023-01-13T10:55:30.334Z","dependency_job_id":null,"html_url":"https://github.com/dreyescat/react-rating","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreyescat%2Freact-rating","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreyescat%2Freact-rating/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreyescat%2Freact-rating/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreyescat%2Freact-rating/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreyescat","download_url":"https://codeload.github.com/dreyescat/react-rating/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101565,"owners_count":22014902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rating-component","react"],"created_at":"2025-03-12T11:17:59.403Z","updated_at":"2025-05-15T13:08:36.530Z","avatar_url":"https://github.com/dreyescat.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/react-rating.svg)](https://badge.fury.io/js/react-rating)\n\n# React Rating\n\nReact Rating is a [react](https://github.com/facebook/react) rating component which supports custom symbols both with [inline styles](https://facebook.github.io/react/tips/inline-styles.html) and glyphicons found in popular CSS Toolkits like [Fontawesome](http://fortawesome.github.io/Font-Awesome/icons/) or [Bootstrap](http://getbootstrap.com/components/).\n\nThis React component was inspired by the jQuery plugin [bootstrap-rating](https://github.com/dreyescat/bootstrap-rating).\n\n## Demo\n\nSee [react-rating](http://dreyescat.github.io/react-rating/) in action.\n\n## Installation\n\nYou can install `react-rating` component using the *npm* package manager:\n\n```bash\nnpm install --save react-rating\n```\n\n### Dependencies\n\nThe `react-rating` component [peer depends](https://docs.npmjs.com/files/package.json#peerdependencies) on the [React](http://facebook.github.io/react/) library.\n\nYou can install React using *npm* too:\n\n```bash\nnpm install --save react\n```\n\n## Upgrade Warning\n\nIf you are using a version of React Rating \u003c v1.0 be aware that **there are API changes between anything \u003c v1.0 and v1.0 .** See the **Properties** and **Deprecated Properties and Callbacks** sections below for a documentation of the current API and how it compares to the old.\n\n## Usage\n\n1. Require the Rating Component\n\n    ```javascript\n    var Rating = require('react-rating');\n    ```\n\n2. Start using it\n\n    With raw javascript:\n\n    ```javascript\n    React.createElement(Rating)\n    ```\n\n    Or with JSX:\n\n    ```jsx\n    \u003cRating /\u003e\n    ```\n\n## Properties\n\nProperty          | Type                                           | Default              | Description\n---               | ---                                            | ---                  | ---\n`start`           | *number*                                       | 0                    | Range starting value (exclusive).\n`stop`            | *number*                                       | 5                    | Range stop value (inclusive).\n`step`            | *number*                                       | 1                    | Describes how many values each Symbol represents. For example, for a `start` value of 0, a `stop` value of 10 and a `step` of 2, we will end up with 5 Symbols, with each Symbol representing value increments of 2.\n`fractions`       | *number*                                       | 1                    | Number of equal subdivisions that can be selected as a rating in each Symbol. For example, for a `fractions` value of 2, you will be able to select a rating with a precision of down to half a Symbol. Must be \u003e= 1\n`initialRating`   | *number*                                   | 0                    | The value that will be used as an initial rating. This is the old `initialRate`.\n`placeholderRating`   | *number*                                   | 0                    | If you do not define an `initialRating` value, you can use a placeholder rating. Visually, this will have the same result as if you had defined an `initialRating` value. If `initialRating` is set `placeholderRating` is not taken into account. This is the old `placeholderRate`\n`readonly`        | *bool*                                         | false                | Whether the rating can be modified or not.\n`quiet`           | *bool*                                         | false                | Whether to animate rate hovering or not.\n`direction`       | *ltr* or *rtl*                                 | ltr                  | The direction of the rating element contents\n`emptySymbol`     | *element* or *object* or *string* or *array*   | Style.empty          | React element, inline style object, or classes applied to the rating symbols when empty. Can also be an array of such symbols that will be applied in a circular manner (round-robin). This is the old `empty`.\n`fullSymbol`      | *element* or *object* or *string* or *array*   | Style.full           | React element, inline style object, or classes applied to the rating symbols when full. Can also be an array of such symbols that will be applied in a circular manner (round-robin). This is the old `full`.\n`placeholderSymbol`      | *element* or *object* or *string* or *array*   | Style.placeholder           | React element, inline style object, or classes applied to the placeholder rating symbols. Can also be an array of such symbols that will be applied in a circular manner (round-robin). This is the old `placeholder`.\n\n## Callbacks\n\nCallback      | Type                           | Description\n---           | ---                            | ---\n`onChange`    | function (value) {}            | Gets called with the `value` when a different value than the currently set is selected.\n`onClick`     | function (value) {}            | Gets called with the `value` when a symbol is clicked. The value is equal to the value that corresponds to that part of the symbol.\n`onHover`     | function (value) {}            | Gets called with the `value` when you hover over a symbol. The value is equal to the value that corresponds to that part of the symbol. Gets called in `quiet` mode too. When hover ends, gets called with no `value` (i.e. `undefined` as the value).\n\n## Deprecated Properties and Callbacks\n\nThis is a list of deprecated properties and callbacks from versions older than v1.0\n\n* `onRate`\n* `initialRate`\n* `placeholderRate`\n* `empty`\n* `full`\n* `placeholder`\n\n## License\n\n[MIT License](https://github.com/dreyescat/react-rating/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreyescat%2Freact-rating","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreyescat%2Freact-rating","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreyescat%2Freact-rating/lists"}