{"id":4401,"url":"https://github.com/jonsamp/react-native-header-scroll-view","last_synced_at":"2025-08-20T06:32:11.419Z","repository":{"id":55802451,"uuid":"151028522","full_name":"jonsamp/react-native-header-scroll-view","owner":"jonsamp","description":"A React Native component that creates a Apple-esque large header that fades in a smaller header as you scroll.","archived":false,"fork":false,"pushed_at":"2020-08-01T17:27:43.000Z","size":10003,"stargazers_count":127,"open_issues_count":6,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-17T09:07:47.843Z","etag":null,"topics":[],"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/jonsamp.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":"2018-10-01T02:40:52.000Z","updated_at":"2024-10-11T09:53:18.000Z","dependencies_parsed_at":"2022-08-15T07:10:43.297Z","dependency_job_id":null,"html_url":"https://github.com/jonsamp/react-native-header-scroll-view","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/jonsamp%2Freact-native-header-scroll-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonsamp%2Freact-native-header-scroll-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonsamp%2Freact-native-header-scroll-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonsamp%2Freact-native-header-scroll-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonsamp","download_url":"https://codeload.github.com/jonsamp/react-native-header-scroll-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230400606,"owners_count":18219830,"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":[],"created_at":"2024-01-05T20:17:10.746Z","updated_at":"2024-12-19T08:07:51.543Z","avatar_url":"https://github.com/jonsamp.png","language":"JavaScript","readme":"# react-native-header-scroll-view\n\n---\n\n🚨 DEPRECATED and unmaintained 🚨\n\nThis library is an emulation of native iOS large headers. Now you can access the real thing with [react-native-screens/native-stack](https://github.com/software-mansion/react-native-screens/tree/master/native-stack). This library is a drop-in replacement for React Navigation's stack view, and includes direct access to native large headers/transitions etc. It has awesome performance. \n\nYou can see it in action in this app: [github](https://github.com/jonsamp/gray-one), [download on the app stores](https://jovial-sammet-3cec91.netlify.app/).\n\n---\n\n\nA React Native component that mimicks Apple's large header that fades in a smaller header as you scroll, and slightly expands as you scroll up. You can see this effect in Apple's Messages, Books, etc.\n\n![header scroll view gif](https://user-images.githubusercontent.com/6455018/49658165-6c1b9300-fa0f-11e8-9dd9-6d2ac53fe5e9.gif)\n\n## Installation\n\n```bash\n# yarn\nyarn add react-native-header-scroll-view\n\n# npm\nnpm install react-native-header-scroll-view --save\n```\n\nThen, import with:\n\n```js\nimport HeaderScrollView from 'react-native-header-scroll-view';\n```\n\n## Usage\n\nExample usage:\n\n```js\nimport React, { Component } from 'react';\nimport { Text } from 'react-native';\nimport HeaderScrollView from 'react-native-header-scroll-view';\n\nclass App extends Component {\n  render() {\n    return (\n      \u003cHeaderScrollView title=\"For You\"\u003e\n        \u003cText\u003e...\u003c/Text\u003e\n      \u003c/HeaderScrollView\u003e\n    );\n  }\n}\n```\n\nTo use this component with React Navigation, you'd want to disable the built-in header. There are 2 ways to disable the header in React Navigation:\n\nDisable the default header for one screen:\n\n```js\nstatic navigationOptions = {\n  headerShown: false\n};\n```\n\nDisable header globally in `createStackNavigator`:\n\n```js\nconst Home = createStackNavigator(\n  {\n    ExampleScreen1,\n    ExampleScreen1,\n  },\n  {\n    headerMode: 'none',\n  }\n);\n```\n\n## Props\n\nFor default Apple-style settings, you only need to provide:\n\n| Prop    | Type   | Description                                                                                                                             |\n| ------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `title` | string | The title of the header. This will show up as large text inside the scroll view and then fade in as the smaller text inside the header. |\n\nFrom there, you can customize this component to get exactly what you want.\n\n| Prop                            | Type                         | Description                                                                                                             |\n| ------------------------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| `titleStyle`                    | React Native style or Object | Styles the large header title component inside the scroll view.                                                         |\n| `containerStyle`                | React Native style or Object | Styles the entire container wrapping the header and the scrollview.                                                     |\n| `headerContainerStyle`          | React Native style or Object | Styles the container of the header component that appears after scrolling.                                              |\n| `headerComponentContainerStyle` | React Native style or Object | Styles the component inside the header. Anything within this style will fade in and out as the scroll position changes. |\n| `headlineStyle`                 | React Native style or Object | Styles the header text inside the header that appears after scrolling.                                                  |\n| `scrollContainerStyle`          | React Native style or Object | Styles the scroll view component.                                                                                       |\n| `fadeDirection`                 | String                       | When the header component fades, it can fade `'up'` or `'down'`,                                                        |\n| `scrollViewProps`               | Object                       | Pass any extra props to the scrollView.                                                                                 |\n\nVisual reference of the styles containers:\n\n\u003cimg width=\"1013\" alt=\"screen shot 2018-12-07 at 10 55 25 am\" src=\"https://user-images.githubusercontent.com/6455018/49657862-9de02a00-fa0e-11e8-8f10-37ada69d917d.png\"\u003e\n","funding_links":[],"categories":["Components"],"sub_categories":["Navigation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonsamp%2Freact-native-header-scroll-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonsamp%2Freact-native-header-scroll-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonsamp%2Freact-native-header-scroll-view/lists"}