{"id":26400551,"url":"https://github.com/avaneeshtripathi/react-dice-roll","last_synced_at":"2026-03-02T14:37:57.655Z","repository":{"id":42065930,"uuid":"280644521","full_name":"avaneeshtripathi/react-dice-roll","owner":"avaneeshtripathi","description":"A highly customizable dice roll package built in react.","archived":false,"fork":false,"pushed_at":"2024-09-27T06:50:04.000Z","size":97,"stargazers_count":36,"open_issues_count":4,"forks_count":24,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T03:11:50.482Z","etag":null,"topics":["dice","dice-roller","react","react-dice-roll"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-dice-roll","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avaneeshtripathi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-18T11:42:16.000Z","updated_at":"2024-11-09T18:54:30.000Z","dependencies_parsed_at":"2024-06-18T21:24:41.484Z","dependency_job_id":"126793be-39d6-4a91-8e6d-e3dd52149f37","html_url":"https://github.com/avaneeshtripathi/react-dice-roll","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"bc8dec71e289b8657feba7d6dd4e6be7ac77599b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avaneeshtripathi%2Freact-dice-roll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avaneeshtripathi%2Freact-dice-roll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avaneeshtripathi%2Freact-dice-roll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avaneeshtripathi%2Freact-dice-roll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avaneeshtripathi","download_url":"https://codeload.github.com/avaneeshtripathi/react-dice-roll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244048765,"owners_count":20389399,"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":["dice","dice-roller","react","react-dice-roll"],"created_at":"2025-03-17T14:26:47.897Z","updated_at":"2026-03-02T14:37:57.585Z","avatar_url":"https://github.com/avaneeshtripathi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-dice-roll\n\nA highly customizable dice roll package built in react.\n\n\n## [Live Demo](https://codesandbox.io/s/dazzling-curie-s4tj7)\n\n## Installation\n\nUse the package manager [yarn](https://classic.yarnpkg.com/en/docs/install) to install `react-dice-roll`.\n\n```bash\nyarn add react-dice-roll\n```\n\nor using [npm](https://www.npmjs.com/get-npm)\n\n```bash\nnpm install react-dice-roll\n```\n\n\n## Usage\n\n```jsx\nimport Dice from 'react-dice-roll';\n```\n\n```jsx\n\u003cDice onRoll={(value) =\u003e console.log(value)} /\u003e\n```\n\n## Usage\n\n|     Prop     |       Type      | Default |             Description               |\n| :----------: | :-------------: | :-----: | :-----------------------------------: |\n| rollingTime  |     number      |   1000  | Rolling time for dice in milliseconds |\n|    onRoll    | (value) =\u003e void |    -    | Function which receives the values between 1 - 6 after the dice roll |\n|    triggers  |     string[]    | ['click'] | Accepts an array of key strings which replaces the default trigger of dice roll `onClick`. Multiple key strings can be passed as an array including the `click` to use multiple triggers for dice roll key. eg: ['Enter', 'a', 'click'] |\n| defaultValue |  number (1-6)   |    6    | Default value of the dice before rolling |\n|     size     |     number      |   250   | Dimensions of the dice in pixels |\n|    sound     |     string      |    -    | URL for the sound to play on dice roll |\n|   disabled   |     boolean     |    -    | Whether the dice is disabled or not |\n|    faces     |    string[]     |    -    | Array of image urls for custom sides of the dice |\n|    faceBg    |     string      |    -    | Custom background color for the dice face |\n|  placement   | top-left, top-right, bottom-left, bottom-right | - | Placement of the device if put inside a relative positioned element |\n|  cheatValue  |  number (1-6)   |    -    | Cheat Value for the dice. If passed, dice will always roll to this value |\n\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaneeshtripathi%2Freact-dice-roll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favaneeshtripathi%2Freact-dice-roll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaneeshtripathi%2Freact-dice-roll/lists"}