{"id":16897781,"url":"https://github.com/behnammodi/react-native-arrival","last_synced_at":"2025-04-11T13:51:58.416Z","repository":{"id":57335451,"uuid":"190861310","full_name":"behnammodi/react-native-arrival","owner":"behnammodi","description":"Animation when Component is mount","archived":false,"fork":false,"pushed_at":"2021-02-22T11:31:37.000Z","size":248,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-21T15:18:26.975Z","etag":null,"topics":["animation","easing","react-native","spring","timing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/behnammodi.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}},"created_at":"2019-06-08T07:57:51.000Z","updated_at":"2021-02-22T11:31:33.000Z","dependencies_parsed_at":"2022-08-29T21:11:46.641Z","dependency_job_id":null,"html_url":"https://github.com/behnammodi/react-native-arrival","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnammodi%2Freact-native-arrival","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnammodi%2Freact-native-arrival/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnammodi%2Freact-native-arrival/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnammodi%2Freact-native-arrival/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/behnammodi","download_url":"https://codeload.github.com/behnammodi/react-native-arrival/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247407996,"owners_count":20934133,"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":["animation","easing","react-native","spring","timing"],"created_at":"2024-10-13T17:39:46.935Z","updated_at":"2025-04-11T13:51:58.390Z","avatar_url":"https://github.com/behnammodi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Animation when Component is mount\n\nreact-native-arrival\n\n[![NPM](https://nodei.co/npm/react-native-arrival.png)](https://nodei.co/npm/react-native-arrival/)\n\n![react-native-arrival](http://itten.ir/file/react-native-arrival.gif)\n\nLeft without react-native-arrival and right with react-native-arrival\n\n## Install\n\n`npm i react-native-arrival`\n\n## Use\n\n```jsx\nimport React, { Component } from 'react';\nimport { Text, View } from 'react-native';\nimport Arrival from 'react-native-arrival';\n\nclass ScreenA extends Component {\n  render() {\n    return (\n      \u003cView style={{ flex: 1 }}\u003e\n        \u003cText\u003eScreen A\u003c/Text\u003e\n      \u003c/View\u003e\n    );\n  }\n}\n\nexport default Arrival(ScreenA, {\n  translateX: { from: 500, to: 0 },\n  translateY: { from: 100, to: 0 },\n  opacity: { from: 0, to: 1 }\n});\n```\n\n## More\n\nYou can use all tranform property:\n\n```\np or perspective: number\nr or rotate: string\nrx or rotateX: string\nry or rotateY: string\nrz or rotateZ: string\ns or scale: number\nsx or scaleX: number\nsy or scaleY: number\nx or translateX: number\ny or translateY: number\nskewX: string\nskewY: string\nopacity: number\n```\n\n## Options\n\n```jsx\nconst ScreenA_ = Arrival(\n  ScreenA,\n  {\n    translateX: { from: 500, to: 0 },\n    translateY: { from: 100, to: 0 }\n  },\n  {\n    toValue: 1,\n    delay: 0,\n    useNativeDriver: true\n  }\n);\n```\n\n## Advance Options\n\nYou can change Arrival 'extends' from `Component` to `PureComponent` or other React Class\n\n```jsx\nimport React, { PureComponent } from 'react';\n\nconst ScreenA_ = Arrival(\n  ScreenA,\n  {\n    scale: { from: 0, to: 1 }\n  },\n  {\n    extends: PureComponent\n  }\n);\n```\n\nYou can change Animated method from `spring` to `timing` and add method config\n\nhttps://facebook.github.io/react-native/docs/animated#timing\n\n```jsx\nimport { Easing } from 'react-native';\nconst ScreenA_ = Arrival(\n  ScreenA,\n  {\n    scale: { from: 0, to: 1 }\n  },\n  {\n    method: 'timing',\n    timing: {\n      easing: Easing.linear,\n      duration: 5000 // 5sec\n    }\n  }\n);\n```\n\nOr change `spring` config\n\nhttps://facebook.github.io/react-native/docs/animated#spring\n\n```jsx\nimport { Easing } from 'react-native';\nconst ScreenA_ = Arrival(\n  ScreenA,\n  {\n    scale: { from: 0, to: 1 }\n  },\n  {\n    spring: {\n      friction: 7,\n      tension: 40,\n      speed: 12,\n      bounciness: 8\n    }\n  }\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehnammodi%2Freact-native-arrival","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbehnammodi%2Freact-native-arrival","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehnammodi%2Freact-native-arrival/lists"}