{"id":4228,"url":"https://github.com/monterosalondon/react-native-elastic-stack","last_synced_at":"2025-08-04T01:31:57.693Z","repository":{"id":57127971,"uuid":"90979108","full_name":"monterosalondon/react-native-elastic-stack","owner":"monterosalondon","description":"Elastick Stack for React Native","archived":false,"fork":false,"pushed_at":"2018-03-01T08:06:41.000Z","size":157625,"stargazers_count":79,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T18:45:25.335Z","etag":null,"topics":["elastic-stack","react","react-native","react-native-component"],"latest_commit_sha":null,"homepage":null,"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/monterosalondon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-11T12:55:11.000Z","updated_at":"2024-06-21T08:50:51.000Z","dependencies_parsed_at":"2022-09-11T10:12:32.533Z","dependency_job_id":null,"html_url":"https://github.com/monterosalondon/react-native-elastic-stack","commit_stats":null,"previous_names":["z4o4z/react-native-elastic-stack"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/monterosalondon/react-native-elastic-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monterosalondon%2Freact-native-elastic-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monterosalondon%2Freact-native-elastic-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monterosalondon%2Freact-native-elastic-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monterosalondon%2Freact-native-elastic-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monterosalondon","download_url":"https://codeload.github.com/monterosalondon/react-native-elastic-stack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monterosalondon%2Freact-native-elastic-stack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268636316,"owners_count":24282075,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["elastic-stack","react","react-native","react-native-component"],"created_at":"2024-01-05T20:17:05.157Z","updated_at":"2025-08-04T01:31:54.769Z","avatar_url":"https://github.com/monterosalondon.png","language":"JavaScript","funding_links":[],"categories":["Components","Others"],"sub_categories":["UI"],"readme":"[![](https://img.shields.io/npm/dm/@monterosa/react-native-elastic-stack.svg?style=flat-square)](https://www.npmjs.com/package/@monterosa/react-native-elastic-stack)\n\n# react-native-elastic-stack\n\nReact Native component that implements [elastic stack effect](https://tympanus.net/Development/ElasticStack/)\n\n## Installation\n\n```\n$ npm install @monterosa/react-native-elastic-stack --save\n```\n\n## Demo\n\n| ![](./demo/ios-demo-1.gif) | ![](./demo/ios-demo-2.gif) | ![](./demo/ios-demo-3.gif) | ![](./demo/ios-demo-4.gif) |\n\n## Basic Usage\n\n```js\nimport ElasticStack from '@monterosa/react-native-elastic-stack';\n\n// Inside of a component's render() method:\nrender() {\n  return (\n    \u003cElasticStack\n      items={Array.from({ length: 5 }).map(\n        (_, i) =\u003e `http://lorempixel.com/640/480/city/?item=${i}`,\n      )}\n      itemWidth={itemWidth}\n      itemHeight={itemHeight}\n      renderItem={url =\u003e \u003cItem image={url} width={itemWidth} height={itemHeight} /\u003e}\n      elastickRange={0.9}\n      elastickItemsCount={5}\n    /\u003e\n  );\n}\n```\n\n## Examples\n\nPlease clone the repo and run `npm run storybook` or `yarn storybook` to show examples of usages.\n\n## Usage (API)\n\nonPanResponderGrant: PropTypes.func,\nonPanResponderRelease: PropTypes.func,\n\n| Property | Type | Defaut | Description |\n| -------- | ---- | -------- | ----------- |\n| `style` | `object` | `{}` | Component's styles. |\n| `items` | `array` | `[]` | Array of data for the items to be rendered. |\n| `onSwiped` | `func` | `(itemIndex) =\u003e {}` | Function to be called when a item is swiped. |\n| `infinite` | `bool` | `false` | Keep swiping indefinitely. |\n| `distDrag` | `number` | `70` | If the user stops dragging the image in a area that does not exceed for either x or y then the image goes back to the stack. |\n| `onXChange` | `func` | `() =\u003e {)` | Function to be called when `x` of current item changed. |\n| `onYChange` | `func` | `() =\u003e {}` | Function to be called when `y` of current item changed |\n| `itemWidth` | `number` | `Dimensions.get('window').width * 0.8` | This is the width of the item. |\n| `itemHeight` | `number` | `Dimensions.get('window').height * 0.8` | This is the width of the item. |\n| `directions` | `array` | `[true, true, true, true]` | Supported directions([top, right, bottom, left]) in which items can swipe out. |\n| `renderItem` | `func` | `(itemData, itemWidth, itemHeight) =\u003e {}` | Function to render the item based on the data. |\n| `onSwipedTop` | `func` | `(itemIndex) =\u003e {}` | Function to be called when a item is swiped top. |\n| `onSwipedLeft` | `func` | `(itemIndex) =\u003e {}` | Function to be called when a item is swiped left. |\n| `onStackEnded` | `func` | `() =\u003e {}` | Function to be called when stack is ended. |\n| `rotateDegree` | `number` | `10` | The value by which items should rotate. |\n| `reduceScaleBy` | `number` | `0.05` | The value by which the next items should decrease. |\n| `onSwipedRight` | `func` | `(itemIndex) =\u003e {}` | Function to be called when a item is swiped right. |\n| `reduceDegreeBy` | `number` | `0.65` | The value by which the next items should reduce rotate. |\n| `onSwipedBottom` | `func` | `(itemIndex) =\u003e {}` | Function to be called when a item is swiped bottom. |\n| `reduceOpacityBy` | `number` | `0.2` | The value by which the next item should be more transparent. |\n| `activeItemIndex` | `number` | `0` | Default item index. |\n| `stackEffectHeight` | `number` | `5` | The height of the stack effect. |\n| `reduceTransformBy` | `number` | `0.7` | The value by which the next items should reduce transforms. |\n| `elastickItemsCount` | `number` | `3` | Count of items rendered at the same time. |\n| `onPanResponderGrant` | `func` | `() =\u003e {}` | |\n| `onPanResponderRelease` | `func` | `() =\u003e {}` | |\n\n## Latest changelog\n\nAll changes [here](./CHANGELOG.md)\n\n### 1.3.1 - 2018-02-13\n\n#### Fixed\n\n* replaced `**` with `Math.pow`\n\n### 1.3.0 - 2018-02-11\n\n#### Added\n\n* stack effect, now you can see the next curds\n* new props: `rotateDegree`, `reduceDegreeBy`, `stackEffectHeight`\n\n#### Changed\n\n* the props `elastickRange` changed to `reduceTransformBy`\n\n## Contributing\n\nI welcome contributions! Please open an issue if you have any feature ideas\nor find any bugs. I also accept pull requests with open arms. I will\ngo over the issues when I have time. :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonterosalondon%2Freact-native-elastic-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonterosalondon%2Freact-native-elastic-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonterosalondon%2Freact-native-elastic-stack/lists"}