{"id":28931512,"url":"https://github.com/ridvanaltun/react-native-story-component","last_synced_at":"2025-07-16T21:37:57.154Z","repository":{"id":37709268,"uuid":"496373687","full_name":"ridvanaltun/react-native-story-component","owner":"ridvanaltun","description":"Add Instagram story feature to your React-Native app.","archived":false,"fork":false,"pushed_at":"2023-08-09T14:53:54.000Z","size":6646,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-22T16:06:29.454Z","etag":null,"topics":["react-native","story"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ridvanaltun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-25T20:03:43.000Z","updated_at":"2024-01-12T10:49:13.000Z","dependencies_parsed_at":"2022-09-01T13:01:15.740Z","dependency_job_id":null,"html_url":"https://github.com/ridvanaltun/react-native-story-component","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/ridvanaltun/react-native-story-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ridvanaltun%2Freact-native-story-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ridvanaltun%2Freact-native-story-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ridvanaltun%2Freact-native-story-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ridvanaltun%2Freact-native-story-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ridvanaltun","download_url":"https://codeload.github.com/ridvanaltun/react-native-story-component/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ridvanaltun%2Freact-native-story-component/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265542401,"owners_count":23785219,"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":["react-native","story"],"created_at":"2025-06-22T16:06:25.290Z","updated_at":"2025-07-16T21:37:57.148Z","avatar_url":"https://github.com/ridvanaltun.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-story-component \u003c!-- omit in toc --\u003e\n\n[![npm version](https://img.shields.io/npm/v/react-native-story-component.svg)](https://npmjs.com/package/react-native-story-component)\n[![CircleCI](https://circleci.com/gh/ridvanaltun/react-native-story-component/tree/master.svg?style=shield)](https://circleci.com/gh/ridvanaltun/react-native-story-component/tree/master)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![license](https://img.shields.io/npm/l/react-native-story-component.svg)](https://github.com/ridvanaltun/react-native-story-component/blob/master/LICENSE)\n\n\u003e A decent story component for React-Native\n\n| Preview                                                           |\n| ----------------------------------------------------------------- |\n| \u003cimg src=\"docs/preview.gif\" alt=\"Preview Image\" width=\"300px\"  /\u003e |\n\n# Table of Contents \u003c!-- omit in toc --\u003e\n\n- [Getting started](#getting-started)\n- [Props](#props)\n- [Usage](#usage)\n- [Example App](#example-app)\n- [Credit](#credit)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Getting started\n\n```sh\nnpm i react-native-story-component\n```\n\n## Props\n\n| Name                 | Description                               | Type                                            | Default Value |\n| :------------------- | :---------------------------------------- | :---------------------------------------------- | :-----------: |\n| data                 | Array of stories.                         | UserStory[]                                     |               |\n| unPressedBorderColor | Unpressed border color of profile circle  | color                                           |      red      |\n| pressedBorderColor   | Pressed border color of profile circle    | color                                           |     grey      |\n| onClose              | Todo when close                           | (item: UserStory) =\u003e void                       |     null      |\n| onStart              | Todo when start                           | (item: UserStory) =\u003e void                       |     null      |\n| duration             | Per story duration in seconds             | number                                          |      10       |\n| swipeText            | Text of swipe component                   | string                                          |   Swipe Up    |\n| customSwipeUpButton  | Custom component for swipe area           | () =\u003e ReactNode                                 |               |\n| customCloseButton    | Custom component for close button         | () =\u003e ReactNode                                 |               |\n| customStoryList      | Custom component for story list           | (props: CustomStoryList) =\u003e React.ReactNode     |               |\n| customStoryView      | Custom component for story view           | (props: CustomStoryView) =\u003e React.ReactNode     |               |\n| customProfileBanner  | Custom component for profile banner       | (props: CustomProfileBanner) =\u003e React.ReactNode |               |\n| customStoryImage     | Custom component for story image          | (props: CustomStoryImage) =\u003e React.ReactNode    |               |\n| avatarSize           | Size of avatar circle                     | number                                          |      60       |\n| showAvatarText       | Show or hide avatar text                  | bool                                            |     true      |\n| showProfileBanner    | Show or hide profile banner               | bool                                            |     true      |\n| textStyle            | Avatar text style                         | TextStyle                                       |               |\n| prefetchImages       | Prefetch story images                     | bool                                            |     true      |\n| onImagesPrefetched   | Callback function for prefetching process | (allImagesPrefetched: bool) =\u003e void             |               |\n\n## Usage\n\n```jsx\nimport Stories from 'react-native-story-component';\n\nconst App = () =\u003e {\n  return (\n    \u003cStories\n      data={[\n        {\n          id: 1,\n          avatar: 'https://randomuser.me/api/portraits/men/1.jpg',\n          name: 'Marvin Lane',\n          stories: [\n            {\n              id: 1,\n              image: 'https://images.unsplash.com/photo-1510215744419-742d9dce947f?crop=entropy\u0026cs=tinysrgb\u0026fm=jpg\u0026ixlib=rb-1.2.1\u0026q=60\u0026raw_url=true\u0026ixid=MnwxMjA3fDB8MHxzZWFyY2h8NHx8MTA4MHgxOTIwfGVufDB8fDB8fA%3D%3D\u0026auto=format\u0026fit=crop\u0026w=1200',,\n              swipeText: 'Custom swipe text for this story',\n              onPress: () =\u003e console.log('story 1 swiped'),\n            },\n            {\n              id: 2,\n              image: 'https://images.unsplash.com/photo-1493509094819-bd2d26fac21b?crop=entropy\u0026cs=tinysrgb\u0026fm=jpg\u0026ixlib=rb-1.2.1\u0026q=60\u0026raw_url=true\u0026ixid=MnwxMjA3fDB8MHxzZWFyY2h8M3x8MTA4MHgxOTIwfGVufDB8fDB8fA%3D%3D\u0026auto=format\u0026fit=crop\u0026w=1200',\n            },\n          ],\n        },\n        {\n          id: 2,\n          avatar: 'https://randomuser.me/api/portraits/men/2.jpg',\n          name: 'Manuel Weaver',\n          stories: [\n            {\n              id: 1,\n              image: 'https://images.unsplash.com/photo-1524821261922-e353d72c20e5?crop=entropy\u0026cs=tinysrgb\u0026fm=jpg\u0026ixlib=rb-1.2.1\u0026q=60\u0026raw_url=true\u0026ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8MTA4MHgxOTIwfGVufDB8fDB8fA%3D%3D\u0026auto=format\u0026fit=crop\u0026w=1200',\n              swipeText: 'Custom swipe text for this story',\n              onPress: () =\u003e console.log('story 1 swiped'),\n            },\n            {\n              id: 2,\n              image: 'https://images.unsplash.com/photo-1590846083693-f23fdede3a7e?crop=entropy\u0026cs=tinysrgb\u0026fm=jpg\u0026ixlib=rb-1.2.1\u0026q=60\u0026raw_url=true\u0026ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8MTA4MHgxOTIwfGVufDB8fDB8fA%3D%3D\u0026auto=format\u0026fit=crop\u0026w=1200',\n              swipeText: 'Custom swipe text for this story',\n              onPress: () =\u003e console.log('story 2 swiped'),\n            },\n          ],\n        },\n      ]}\n      duration={10}\n      onStart={(openedStory) =\u003e {\n        console.log(openedStory);\n      }}\n      onClose={(closedStory) =\u003e {\n        console.log(closedStory);\n      }}\n      customSwipeUpButton={() =\u003e (\n        \u003cView\u003e\n          \u003cText\u003eSwipe\u003c/Text\u003e\n        \u003c/View\u003e\n      )}\n    /\u003e\n  );\n};\n```\n\n## Example App\n\n```sh\n# clone the project\ngit clone https://github.com/ridvanaltun/react-native-story-component.git\n\n# go into the project\ncd react-native-story-component\n\n# make project ready\nnpm run bootstrap\n\n# go into the example\ncd example\n\n# run for android\nnpm run android\n\n# or\n\n# run for ios\nnpm run ios\n```\n\n## Credit\n\nI copied and rewrite the codebase from https://github.com/caglardurmus/react-native-insta-story in this project. I created this project because I was needed a better one.\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fridvanaltun%2Freact-native-story-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fridvanaltun%2Freact-native-story-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fridvanaltun%2Freact-native-story-component/lists"}