{
  "_id": "@rc-component/rate",
  "maintainers": [
    {
      "name": "zombiej",
      "email": "smith3816@gmail.com"
    },
    {
      "name": "afc163",
      "email": "afc163@gmail.com"
    },
    {
      "name": "madccc",
      "email": "1075746765@qq.com"
    },
    {
      "name": "peachscript",
      "email": "scdzwyxst@gmail.com"
    },
    {
      "name": "chenshuai2144",
      "email": "wasd2144@hotmail.com"
    }
  ],
  "keywords": [
    "react",
    "react-component",
    "react-rate",
    "rate"
  ],
  "dist-tags": {
    "latest": "1.0.1"
  },
  "_rev": "2-6ca3f135289c9843de087a3f7a8f6a85",
  "description": "React Star Rate Component",
  "readme": "# rc-rate\n\nReact Rate Component\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Codecov][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-rate.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-rate\n[github-actions-image]: https://github.com/react-component/rate/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/rate/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/rate/master.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/react-component/rate/branch/master\n[david-url]: https://david-dm.org/react-component/rate\n[david-image]: https://david-dm.org/react-component/rate/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/rate?type=dev\n[david-dev-image]: https://david-dm.org/react-component/rate/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-rate.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-rate\n[bundlephobia-url]: https://bundlephobia.com/result?p=rc-rate\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-rate\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\n## Screenshots\n\n<img src=\"https://img.alicdn.com/tps/TB1ijlpLVXXXXb8XpXXXXXXXXXX-466-172.png\" width=\"288\"/>\n\n## Changelog\n\n- [CHANGELOG](./CHANGELOG.md)\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\n- Local: http://localhost:9001/\n\n- Online: http://react-component.github.io/rate/\n\n## install\n\n[![rc-rate](https://nodei.co/npm/rc-rate.png)](https://npmjs.org/package/rc-rate)\n\n## Usage\n\n```js\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Rate from '@rc-component/rate';\n\nReactDOM.render(\n  <Rate />,\n  document.getElementById('root')\n)\n```\n\n### with [styled-components](https://github.com/styled-components/styled-components)\n```js\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Rate from '@rc-component/rate';\nimport styled from 'styled-components';\n\nconst StyledRate = styled(Rate)`\n  &.rc-rate {\n    font-size: ${({ size }) => size}px;\n  }\n`\n\nReactDOM.render(\n  <StyledRate size=\"24\" />,\n  document.getElementById('root')\n)\n```\n\n## API\n\n### props\n\n| name          | type                              | default       | description                                           |\n| ------------- | --------------------------------- | ------------- | ----------------------------------------------------- |\n| count         | number                            | 5             | Star numbers                                          |\n| value         | number                            | -             | Controlled value                                      |\n| defaultValue  | number                            | 0             | Initial value                                         |\n| allowHalf     | boolean                           | false         | Support half star                                     |\n| allowClear    | boolean                           | true          | Reset when click again                                |\n| style         | object                            | {}            |                                                       |\n| onChange      | function                          | (value) => {} | `onChange` will be triggered when click               |\n| onHoverChange | function                          | (value) => {} | `onHoverChange` will be triggered when hover on stars |\n| character     | ReactNode \\| (props) => ReactNode | ★             | The each character of rate                            |\n| disabled      | boolean                           | false         |                                                       |\n| direction     | string                            | `ltr`         | The direction of rate                                 |\n\n## Test Case\n\n```\nnpm test\nnpm run chrome-test\n```\n\n## Coverage\n\n```\nnpm run coverage\n```\n\nopen coverage/ dir\n\n## License\n\nrc-rate is released under the MIT license.\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/react-component/rate.git"
  },
  "bugs": {
    "url": "https://github.com/react-component/rate/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "@rc-component/rate",
      "version": "1.0.0",
      "keywords": [
        "react",
        "react-component",
        "react-rate",
        "rate"
      ],
      "license": "MIT",
      "_id": "@rc-component/rate@1.0.0",
      "maintainers": [
        {
          "name": "zombiej",
          "email": "smith3816@gmail.com"
        },
        {
          "name": "afc163",
          "email": "afc163@gmail.com"
        },
        {
          "name": "madccc",
          "email": "1075746765@qq.com"
        },
        {
          "name": "peachscript",
          "email": "scdzwyxst@gmail.com"
        },
        {
          "name": "chenshuai2144",
          "email": "wasd2144@hotmail.com"
        }
      ],
      "homepage": "https://github.com/react-component/rate",
      "bugs": {
        "url": "https://github.com/react-component/rate/issues"
      },
      "dist": {
        "shasum": "89fe758fcbd713ec47a0437981eb968cd6f61fdb",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@rc-component/rate/-/rate-1.0.0.tgz",
        "fileCount": 24,
        "integrity": "sha512-X6LPdN67Sjsya/MxnM7bTYJ3wmua9FYt1wgw9L08oM9FfmsiTYSIHJy8D8aMWyDl99LBVq3vTIu135ghCwWkEA==",
        "signatures": [
          {
            "sig": "MEYCIQD3QBFgGK5fL1WAwSTG60BIjiZYUyoWSscV4hMWplfzIgIhAOCjwrCeKXpVgnp1pjldCkPQ7fIlRTc6rWGnydo8/xtl",
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
          }
        ],
        "unpackedSize": 34806
      },
      "main": "./lib/index",
      "types": "./lib/index.d.ts",
      "module": "./es/index",
      "engines": {
        "node": ">=8.x"
      },
      "gitHead": "23ebec0db4b95d00d741d501012c1d981b44d386",
      "scripts": {
        "tsc": "bunx tsc --noEmit",
        "lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
        "test": "rc-test",
        "start": "dumi dev",
        "compile": "father build && lessc assets/index.less assets/index.css",
        "prepare": "dumi setup",
        "coverage": "rc-test --coverage",
        "prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
        "now-build": "npm run docs:build",
        "docs:build": "dumi build",
        "docs:deploy": "gh-pages -d .doc",
        "postpublish": "npm run docs:build && npm run docs:deploy",
        "prepublishOnly": "npm run compile && rc-np"
      },
      "_npmUser": {
        "name": "zombiej",
        "email": "smith3816@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/react-component/rate.git",
        "type": "git"
      },
      "_npmVersion": "10.9.2",
      "description": "React Star Rate Component",
      "directories": {},
      "_nodeVersion": "22.15.1",
      "dependencies": {
        "classnames": "^2.2.5",
        "@rc-component/util": "^1.3.0"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "dumi": "^2.1.2",
        "less": "^3.0.0",
        "react": "^16.0.0",
        "enzyme": "^3.1.1",
        "eslint": "^7.1.0",
        "father": "^4.0.0",
        "cheerio": "1.0.0-rc.12",
        "rc-test": "^7.0.15",
        "gh-pages": "^3.1.0",
        "cross-env": "^7.0.0",
        "react-dom": "^16.0.0",
        "typescript": "^5.0.4",
        "@types/jest": "^29.5.1",
        "@types/react": "^17.0.15",
        "@umijs/fabric": "^3.0.0",
        "enzyme-to-json": "^3.1.2",
        "@rc-component/np": "^1.0.0",
        "@types/react-dom": "^17.0.9",
        "@types/classnames": "^2.2.9",
        "@rc-component/tooltip": "^1.2.1",
        "enzyme-adapter-react-16": "^1.15.6",
        "@rc-component/father-plugin": "^2.1.3"
      },
      "peerDependencies": {
        "react": ">=16.9.0",
        "react-dom": ">=16.9.0"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/rate_1.0.0_1757988190937_0.3095677628790561",
        "host": "s3://npm-registry-packages-npm-production"
      }
    },
    "1.0.1": {
      "name": "@rc-component/rate",
      "version": "1.0.1",
      "description": "React Star Rate Component",
      "keywords": [
        "react",
        "react-component",
        "react-rate",
        "rate"
      ],
      "homepage": "https://github.com/react-component/rate",
      "bugs": {
        "url": "https://github.com/react-component/rate/issues"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/react-component/rate.git"
      },
      "license": "MIT",
      "main": "./lib/index",
      "module": "./es/index",
      "scripts": {
        "compile": "father build && lessc assets/index.less assets/index.css",
        "coverage": "rc-test --coverage",
        "docs:build": "dumi build",
        "docs:deploy": "gh-pages -d dist",
        "lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
        "now-build": "npm run docs:build",
        "prepare": "dumi setup",
        "prepublishOnly": "npm run compile && rc-np",
        "prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
        "postpublish": "npm run docs:build && npm run docs:deploy",
        "start": "dumi dev",
        "test": "rc-test",
        "tsc": "bunx tsc --noEmit"
      },
      "dependencies": {
        "@rc-component/util": "^1.3.0",
        "clsx": "^2.1.1"
      },
      "devDependencies": {
        "@rc-component/father-plugin": "^2.1.3",
        "@rc-component/np": "^1.0.0",
        "@rc-component/tooltip": "^1.2.1",
        "@types/jest": "^29.5.1",
        "@types/node": "^24.5.2",
        "@types/react": "^17.0.15",
        "@types/react-dom": "^17.0.9",
        "@umijs/fabric": "^3.0.0",
        "cheerio": "1.0.0-rc.12",
        "cross-env": "^7.0.0",
        "dumi": "^2.1.2",
        "enzyme": "^3.1.1",
        "enzyme-adapter-react-16": "^1.15.6",
        "enzyme-to-json": "^3.1.2",
        "eslint": "^7.1.0",
        "father": "^4.0.0",
        "gh-pages": "^3.1.0",
        "less": "^3.0.0",
        "rc-test": "^7.0.15",
        "react": "^16.0.0",
        "react-dom": "^16.0.0",
        "typescript": "^5.0.4"
      },
      "peerDependencies": {
        "react": ">=16.9.0",
        "react-dom": ">=16.9.0"
      },
      "engines": {
        "node": ">=8.x"
      },
      "_id": "@rc-component/rate@1.0.1",
      "gitHead": "87c72e7781fa0e3060d3575e7fd5910f26696e3a",
      "types": "./lib/index.d.ts",
      "_nodeVersion": "22.8.0",
      "_npmVersion": "11.6.0",
      "dist": {
        "integrity": "sha512-bkXxeBqDpl5IOC7yL7GcSYjQx9G8H+6kLYQnNZWeBYq2OYIv1MONd6mqKTjnnJYpV0cQIU2z3atdW0j1kttpTw==",
        "shasum": "836c3c0bea69047f4234383e2ce6ab83a02ee26a",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@rc-component/rate/-/rate-1.0.1.tgz",
        "fileCount": 24,
        "unpackedSize": 34677,
        "signatures": [
          {
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
            "sig": "MEYCIQDVrvzSRgAkcsCTjYhxAwje4oQuKdmgu5Lu5U2dUSIxigIhAM02jQAShfoHz17w6DHkwYN66Bvt51CkOfvRaUCpKobW"
          }
        ]
      },
      "_npmUser": {
        "name": "afc163",
        "email": "afc163@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "zombiej",
          "email": "smith3816@gmail.com"
        },
        {
          "name": "afc163",
          "email": "afc163@gmail.com"
        },
        {
          "name": "madccc",
          "email": "1075746765@qq.com"
        },
        {
          "name": "peachscript",
          "email": "scdzwyxst@gmail.com"
        },
        {
          "name": "chenshuai2144",
          "email": "wasd2144@hotmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages-npm-production",
        "tmp": "tmp/rate_1.0.1_1764298809243_0.03140475958992672"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "@rc-component/rate",
  "time": {
    "created": "2025-09-16T02:03:10.879Z",
    "modified": "2026-05-20T01:37:29.649Z",
    "1.0.0": "2025-09-16T02:03:11.132Z",
    "1.0.1": "2025-11-28T03:00:09.457Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/react-component/rate"
}