{"id":27316943,"url":"https://github.com/vincentcatillon/react-native-confetti-cannon","last_synced_at":"2025-05-16T04:03:41.020Z","repository":{"id":37735992,"uuid":"168721366","full_name":"VincentCATILLON/react-native-confetti-cannon","owner":"VincentCATILLON","description":"React Native confetti explosion and fall like iOS does.","archived":false,"fork":false,"pushed_at":"2023-08-10T05:39:58.000Z","size":11907,"stargazers_count":495,"open_issues_count":25,"forks_count":63,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-16T04:03:21.013Z","etag":null,"topics":["android","animated","animation","cannon","confetti","explosion","fall","flow","flowtype","ios","lightweight","particles","pure-js","react","react-native","react-native-web","typescript","web"],"latest_commit_sha":null,"homepage":"https://vincentcatillon.github.io/react-native-confetti-cannon","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/VincentCATILLON.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-02-01T15:52:36.000Z","updated_at":"2025-04-19T14:06:16.000Z","dependencies_parsed_at":"2024-06-18T13:56:51.579Z","dependency_job_id":"566a2f1e-b80f-4721-aefb-9449fef43e3c","html_url":"https://github.com/VincentCATILLON/react-native-confetti-cannon","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentCATILLON%2Freact-native-confetti-cannon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentCATILLON%2Freact-native-confetti-cannon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentCATILLON%2Freact-native-confetti-cannon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentCATILLON%2Freact-native-confetti-cannon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VincentCATILLON","download_url":"https://codeload.github.com/VincentCATILLON/react-native-confetti-cannon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464891,"owners_count":22075570,"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","animation","cannon","confetti","explosion","fall","flow","flowtype","ios","lightweight","particles","pure-js","react","react-native","react-native-web","typescript","web"],"created_at":"2025-04-12T08:39:09.493Z","updated_at":"2025-05-16T04:03:40.994Z","avatar_url":"https://github.com/VincentCATILLON.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg height=\"400\" src=\"https://github.com/VincentCATILLON/react-native-confetti-cannon/raw/master/.github/demo.gif\" alt=\"React-native-confetti-cannon\"\u003e\n\u003c/p\u003e\n\n[![CircleCI](https://circleci.com/gh/VincentCATILLON/react-native-confetti-cannon.svg?style=svg)](https://circleci.com/gh/VincentCATILLON/react-native-confetti-cannon)\n[![NPM](https://img.shields.io/npm/v/react-native-confetti-cannon/latest?color=%23292C33\u0026label=%20\u0026logo=npm)](https://www.npmjs.com/package/react-native-confetti-cannon)\n[![PLATFORMS](https://img.shields.io/badge/Platforms-iOS%20%7C%C2%A0Android%20%7C%20Web-blue)](https://vincentcatillon.github.io/react-native-confetti-cannon)\n[![TYPES](https://img.shields.io/npm/types/react-native-confetti-cannon)](https://vincentcatillon.github.io/react-native-confetti-cannon)\n[![GITHUB](https://img.shields.io/github/stars/vincentcatillon/react-native-confetti-cannon?style=social)](https://github.com/vincentcatillon/react-native-confetti-cannon)\n\n## Live demo\n\n:rocket: Try yourself on Storybook \u003ca href=\"https://vincentcatillon.github.io/react-native-confetti-cannon\"\u003eweb version\u003c/a\u003e\n\n## Installation\n\n```console\nnpm install react-native-confetti-cannon\n# or\nyarn add react-native-confetti-cannon\n```\n\n## Usage\n\n```js\nimport ConfettiCannon from 'react-native-confetti-cannon';\n\nconst MyComponent = () =\u003e (\n  \u003cConfettiCannon count={200} origin={{x: -10, y: 0}} /\u003e\n);\n```\n\n## Props\n\n| Name             | Type                   | Description                                | Required | Default        |\n|------------------|------------------------|--------------------------------------------|----------|----------------|\n| count            | number                 | items count to display                     | required |                |\n| origin           | {x: number, y: number} | animation position origin                  | required |                |\n| explosionSpeed   | number                 | explosion duration (ms) from origin to top |          | 350            |\n| fallSpeed        | number                 | fall duration (ms) from top to bottom      |          | 3000           |\n| fadeOut          | boolean                | make the confettis disappear at the end    |          | false          |\n| colors           | string[]               | give your own colors to the confettis      |          | default colors |\n| autoStart        | boolean                | auto start the animation                   |          | true           |\n| autoStartDelay   | number                 | delay to wait before triggering animation  |          | 0              |\n\n## Events\n\n| Name              | Returns               | Description                                | Required |\n|-------------------|-----------------------|--------------------------------------------|----------|\n| onAnimationStart  | void                  | callback triggered at animation start      |          |\n| onAnimationResume | void                  | callback triggered at animation resume     |          |\n| onAnimationStop   | void                  | callback triggered at animation stop       |          |\n| onAnimationEnd    | void                  | callback triggered at animation end        |          |\n\n## Methods\n\n| Name             | Returns                | Description                                | Required |\n|------------------|------------------------|--------------------------------------------|----------|\n| start            | void                   | start the animation programmatically       |          |\n| resume           | void                   | resume the animation programmatically      |          |\n| stop             | void                   | stop the animation programmatically        |          |\n\n_For example:_\n\n```js\nimport ConfettiCannon from 'react-native-confetti-cannon';\n\nclass MyComponent extends React.PureComponent {\n  explosion;\n\n  handleSomeKindOfEvent = () =\u003e {\n    this.explosion \u0026\u0026 this.explosion.start();\n  };\n\n  render() {\n    return (\n      \u003cConfettiCannon\n        count={200}\n        origin={{x: -10, y: 0}}\n        autoStart={false}\n        ref={ref =\u003e (this.explosion = ref)}\n      /\u003e\n    );\n  }\n}\n```\n\n## Examples\n\nDeep into the `example` folder to see the [stories](https://github.com/VincentCATILLON/react-native-confetti-cannon/blob/master/example/storybook/stories/index.js) and run:\n\n```console\nnpm install \u0026\u0026 npm start\n```\n\nAnd choose one of the following Expo commands:\n- `i`: open in iOS simulator\n- `a`: open in Android emulator\n- `w`: open in web browser\n\n## :warning: Warning\n\nIt is strongly recommended to use 1.2.0 or higher to avoid this warning introduced in [React-Native 0.62](https://github.com/react-native-community/releases/blob/master/CHANGELOG.md#deprecated):\n\n\u003e Animated: useNativeDriver was not specified. This is a required option and must be explicitly set to true or false\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentcatillon%2Freact-native-confetti-cannon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvincentcatillon%2Freact-native-confetti-cannon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentcatillon%2Freact-native-confetti-cannon/lists"}