{"id":16052176,"url":"https://github.com/kiok46/react-native-collidable","last_synced_at":"2025-03-18T04:31:09.121Z","repository":{"id":57336143,"uuid":"98524464","full_name":"kiok46/react-native-collidable","owner":"kiok46","description":"Collidable Components for React-Native","archived":false,"fork":false,"pushed_at":"2017-10-03T10:50:13.000Z","size":1880,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T07:02:58.774Z","etag":null,"topics":["collision-handling","floating","gravity","npm-package","physics","react","react-component","react-native"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-collidable","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/kiok46.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}},"created_at":"2017-07-27T10:38:51.000Z","updated_at":"2022-07-30T08:03:05.000Z","dependencies_parsed_at":"2022-09-11T02:12:15.353Z","dependency_job_id":null,"html_url":"https://github.com/kiok46/react-native-collidable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiok46%2Freact-native-collidable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiok46%2Freact-native-collidable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiok46%2Freact-native-collidable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiok46%2Freact-native-collidable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiok46","download_url":"https://codeload.github.com/kiok46/react-native-collidable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902277,"owners_count":20366259,"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":["collision-handling","floating","gravity","npm-package","physics","react","react-component","react-native"],"created_at":"2024-10-09T01:07:48.586Z","updated_at":"2025-03-18T04:31:08.761Z","avatar_url":"https://github.com/kiok46.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-collidable\nCollidable Components in react native\n\n### IntroScreen Example\n\n\u003cimg src=\"https://user-images.githubusercontent.com/7335120/28744801-40b809ba-7486-11e7-946b-38ab4e6698c3.gif\" width=\"350\"\u003e\n\n\n### Bouncing Football Example\n\n\u003cimg src=\"https://user-images.githubusercontent.com/7335120/28745749-1a3e3dde-749c-11e7-8dbf-802b004a642c.gif\" width=\"350\"\u003e\n\n\n### Note: Only tested with iOS, not recommended to be used until `version 1.0` is released.\n\n\nFind a working example on Expo: https://exp.host/@kiok46/collidable\n\n\n#### Properties\n*Note: Other properties will be passed down to underlying component.*\n\n| Prop | Description | Default |\n|---|---|---|\n|**`disablePanResponder`**| Whether to use PanResponder or not. |*false*|\n|**`containerDimension`**|For how long the animation will run (milliseconds). |`[0, Screen Width, Screen Height, 0]`|\n|**`collidableOffSetHeight`**| Use `Container Height - Component Height` to create a illusion of contact with the edges. |`75`|\n|**`collidableOffSetWidth`**| Use `Container Width - Component Width` to create a illusion of contact with the edges. |`75`|\n|**`initialVelocityX`**| Initial Velocity of Component in x-direction |`0`|\n|**`initialVelocityY`**| Initial Velocity of Component in y-direction |`0`|\n|**`velocityMinX`**| Minimum velocity in x-direction required to to stop the Component |`0.06`|\n|**`velocityMinY`**| Minimum velocity in y-direction required to to stop the Component |`0.06`|\n|**`velocityMaxX`**| Max velocity in x-direction once reached use `ononReachingMaxVelocity` callback |`30`|\n|**`velocityMaxY`**| Max velocity in y-direction once reached use `ononReachingMaxVelocity` callback |`30`|\n|**`verticalGravityEnabled`**| Gravity effect in vertical direction  |*false*|\n|**`horizontalGravityEnabled`**|  Gravity effect in horizontal direction |*false*|\n|**`verticalGravity`**| Gravity effect value in vertical direction. |`.2`|\n|**`horizontalGravity`**| Gravity effect value in horizontal direction. |`.2`|\n|**`enableImpactForce`**| Impace force is used to reduce the speed of colliding Component after impact  |*false*|\n|**`verticalImpactForce`**| Impact force for reducing vertical speed  |`0`|\n|**`horizontalImpactForce`**| Impact force for reducing horizontal speed |`0`|\n|**`collidableStyle`**| Style for the Animated Component |*None*|\n|**`onReachingMaxVelocity`**| Called once the Component's velocity is \u003e= `velocityMaxX` or `velocityMaxY` |`() =\u003e {}`|\n\n\n### Want to contribute or need to see some improvements?\nI would love that, please create an issue or send a PR.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiok46%2Freact-native-collidable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiok46%2Freact-native-collidable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiok46%2Freact-native-collidable/lists"}