{"id":21923410,"url":"https://github.com/f0rr0/react-native-rating","last_synced_at":"2025-04-19T15:38:36.489Z","repository":{"id":57339404,"uuid":"93310193","full_name":"f0rr0/react-native-rating","owner":"f0rr0","description":"🌟 cross-platform rating for react-native built with Animated and native driver 🌟","archived":false,"fork":false,"pushed_at":"2018-09-06T05:54:08.000Z","size":456,"stargazers_count":91,"open_issues_count":7,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-24T19:55:18.631Z","etag":null,"topics":["android","animated","ios","react-native"],"latest_commit_sha":null,"homepage":"","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/f0rr0.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":"2017-06-04T11:53:26.000Z","updated_at":"2024-04-02T17:40:50.000Z","dependencies_parsed_at":"2022-09-16T07:41:09.306Z","dependency_job_id":null,"html_url":"https://github.com/f0rr0/react-native-rating","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f0rr0%2Freact-native-rating","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f0rr0%2Freact-native-rating/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f0rr0%2Freact-native-rating/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f0rr0%2Freact-native-rating/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f0rr0","download_url":"https://codeload.github.com/f0rr0/react-native-rating/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226986631,"owners_count":17713649,"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":["android","animated","ios","react-native"],"created_at":"2024-11-28T21:11:35.108Z","updated_at":"2024-11-28T21:11:35.891Z","avatar_url":"https://github.com/f0rr0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-rating\n\n\u003e Display ratings in your react-native app like a pro. Works on both iOS and Android.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/rating.gif\" align=\"center\" alt=\"\" height=\"400\"/\u003e\n\u003c/p\u003e\n\n### Install\n`npm i -S react-native-rating`\nor\n`yarn add react-native-rating`\n\n### Usage\n```js\nimport Rating from 'react-native-rating'\nimport { Easing } from 'react-native'\n\nconst images = {\n  starFilled: require('./assets/star_filled.png'),\n  starUnfilled: require('./assets/star_unfilled.png')\n}\n\nconst myRandoComponent = () =\u003e (\n  \u003cRating\n    onChange={rating =\u003e console.log(rating)}\n    selectedStar={images.starFilled}\n    unselectedStar={images.starUnfilled}\n    config={{\n      easing: Easing.inOut(Easing.ease),\n      duration: 350\n    }}\n    stagger={80}\n    maxScale={1.4}\n    starStyle={{\n      width: 40,\n      height: 40\n    }}\n  /\u003e\n)\n```\n\n### Customization\nRefer to the `propTypes` and `defaultProps` definition below:\n\n```js\nstatic propTypes = {\n  max: PropTypes.number,\n  initial: PropTypes.number,\n  onChange: PropTypes.func,\n  config: PropTypes.shape({\n    easing: PropTypes.func.isRequired,\n    duration: PropTypes.number.isRequired\n  }),\n  editable: PropTypes.bool,\n  stagger: PropTypes.number,\n  maxScale: PropTypes.number,\n  starStyle: ViewPropTypes.style,\n  containerStyle: ViewPropTypes.style,\n  selectedStar: PropTypes.number.isRequired,\n  unselectedStar: PropTypes.number.isRequired,\n  onAnimationComplete: PropTypes.func\n}\n\nstatic defaultProps = {\n  max: 5,\n  initial: 0,\n  onChange: () =\u003e {},\n  config: {\n    easing: Easing.elastic(1),\n    duration: 400\n  },\n  stagger: 100,\n  maxScale: 1.1,\n  starStyle: {\n    width: 36,\n    height: 36\n  },\n  editable: true,\n  containerStyle: { flexDirection: 'row' },\n  onAnimationComplete: () =\u003e {}\n}\n```\n\n### License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff0rr0%2Freact-native-rating","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff0rr0%2Freact-native-rating","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff0rr0%2Freact-native-rating/lists"}