{"id":20664752,"url":"https://github.com/jasudev/scroller","last_synced_at":"2025-04-19T16:24:40.032Z","repository":{"id":41832383,"uuid":"454774925","full_name":"jasudev/Scroller","owner":"jasudev","description":"You can animate in individual views based on scroll position. Developed with SwiftUI. This library supports iOS/macOS.","archived":false,"fork":false,"pushed_at":"2022-04-27T13:07:19.000Z","size":72566,"stargazers_count":31,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2023-03-04T17:45:26.452Z","etag":null,"topics":["animation","animations","scroll","scroll-animate","scroll-animation","scroll-animations","scrollable","scrolling","scrollview","scrollview-component","scrollviewer","swift","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/jasudev.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":"2022-02-02T12:57:01.000Z","updated_at":"2023-02-17T04:21:20.000Z","dependencies_parsed_at":"2022-08-11T18:50:41.481Z","dependency_job_id":null,"html_url":"https://github.com/jasudev/Scroller","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FScroller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FScroller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FScroller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FScroller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasudev","download_url":"https://codeload.github.com/jasudev/Scroller/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224960296,"owners_count":17398836,"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","animations","scroll","scroll-animate","scroll-animation","scroll-animations","scrollable","scrolling","scrollview","scrollview-component","scrollviewer","swift","swiftui"],"created_at":"2024-11-16T19:26:04.123Z","updated_at":"2024-11-16T19:26:04.862Z","avatar_url":"https://github.com/jasudev.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Scroller for SwiftUI**\nYou can animate in individual views based on scroll position. Developed with SwiftUI. This library supports iOS/macOS.\n\n[![Platforms](https://img.shields.io/badge/Platforms-iOS%20%7C%20macOS-blue?style=flat-square)](https://developer.apple.com/macOS)\n[![iOS](https://img.shields.io/badge/iOS-14.0-blue.svg)](https://developer.apple.com/iOS)\n[![macOS](https://img.shields.io/badge/macOS-11.0-blue.svg)](https://developer.apple.com/macOS)\n[![instagram](https://img.shields.io/badge/instagram-@dev.fabula-orange.svg?style=flat-square)](https://www.instagram.com/dev.fabula)\n[![SPM](https://img.shields.io/badge/SPM-compatible-red?style=flat-square)](https://developer.apple.com/documentation/swift_packages/package/)\n[![MIT](https://img.shields.io/badge/licenses-MIT-red.svg)](https://opensource.org/licenses/MIT)  \n\n## Screenshot\n|Example|Vertical|Horizontal|\n|:---:|:---:|:---:|\n|\u003cimg src=\"Markdown/Scroller.gif\"\u003e|\u003cimg src=\"Markdown/ScrollerVertical.gif\"\u003e|\u003cimg src=\"Markdown/ScrollerHorizontal.gif\"\u003e|\n\n## Example\n[https://fabulaapp.page.link/222](https://fabulaapp.page.link/222)  \n[https://fabulaapp.page.link/223](https://fabulaapp.page.link/223)\n\n## Usages\n1. Scroller\n    ```swift\n    Scroller(.vertical, value: $valueV) {\n        ForEach(0...5, id: \\.self) { index in\n            GeometryReader { proxy in\n                ScrollerVContent(value: proxy.scrollerValue(.vertical))\n            }\n        }\n    } lastContent: {\n        Rectangle()\n            .fill(Color.blue)\n            .overlay(Text(\"LastView\"))\n            .foregroundColor(Color.white)\n    }\n    ```\n\n2. Each view only needs to conform to the ScrollerContent protocol.\n    ```swift\n    struct ScrollerVContent: ScrollerContent {\n    \n        /// Bind each view's scroll-relative value. It is a value between 0 and 1.\n        var value: CGFloat = 0\n        \n        var body: some View {\n            GeometryReader { proxy in\n                ScrollerInfoView(axes: .vertical, value: value, proxy: proxy)\n                    .offset(y: proxy.size.height * value)\n                    .padding(10)\n                Rectangle().fill(Color.blue)\n                    .frame(width: proxy.size.width * value, height: 5)\n                    .offset(y: proxy.size.height * value)\n            }\n            .background(Color.orange.opacity(1.0 - value))\n        }\n    }\n    ```\n## Swift Package Manager\nThe Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, adding Scroller as a dependency is as easy as adding it to the dependencies value of your Package.swift.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/jasudev/Scroller.git\", .branch(\"main\"))\n]\n```\n## Contact\ninstagram : [@dev.fabula](https://www.instagram.com/dev.fabula)  \nemail : [dev.fabula@gmail.com](mailto:dev.fabula@gmail.com)\n\n## License\nScroller is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasudev%2Fscroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasudev%2Fscroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasudev%2Fscroller/lists"}