{"id":21668444,"url":"https://github.com/anbalagand/carouselview","last_synced_at":"2025-12-27T20:24:13.543Z","repository":{"id":264494131,"uuid":"893522072","full_name":"AnbalaganD/CarouselView","owner":"AnbalaganD","description":"This library simplifies the implementation of carousel-style interfaces in SwiftUI applications while maintaining smooth, infinite scrolling functionality.","archived":false,"fork":false,"pushed_at":"2024-12-02T10:23:40.000Z","size":678,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T07:52:28.045Z","etag":null,"topics":["carousel","carouselview","infinite-scroll","ios","slide","slider","slideview","spm","swift","swiftui","tabvi","tabview-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/AnbalaganD.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-24T16:56:10.000Z","updated_at":"2024-12-02T10:23:43.000Z","dependencies_parsed_at":"2025-01-25T08:41:09.246Z","dependency_job_id":"28676f6e-387f-46b6-9c69-197e54d1c913","html_url":"https://github.com/AnbalaganD/CarouselView","commit_stats":null,"previous_names":["anbalagand/carouselview"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnbalaganD%2FCarouselView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnbalaganD%2FCarouselView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnbalaganD%2FCarouselView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnbalaganD%2FCarouselView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnbalaganD","download_url":"https://codeload.github.com/AnbalaganD/CarouselView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253025337,"owners_count":21842409,"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":["carousel","carouselview","infinite-scroll","ios","slide","slider","slideview","spm","swift","swiftui","tabvi","tabview-swiftui"],"created_at":"2024-11-25T12:15:52.822Z","updated_at":"2025-12-27T20:24:13.538Z","avatar_url":"https://github.com/AnbalaganD.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"This library simplifies the implementation of carousel-style interfaces in SwiftUI applications while maintaining smooth, infinite scrolling functionality.\n\n![CarouselView](Screenshot/CarouselView.gif)\n\n## Features\n♾️ Infinite scrolling support\n\n🎯 Selected item tracking\n\n📏 Configurable item spacing\n\n📍 Current index monitoring\n\n🔄 Auto-scroll with customizable interval\n\n⏸️ Auto-pause on user interaction\n\n⚡️ Native SwiftUI implementation\n\n## Swift Package manager (SPM)\nCarouselView is available through [SPM](https://swiftpackageindex.com/AnbalaganD/CarouselView). Use below URL to add as a dependency\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/AnbalaganD/CarouselView\", .upToNextMajor(from: \"1.1.2\"))\n]\n```\n\n## Usage\n\n### Basic Usage\n```swift\nimport CarouselView\n\nstruct ContentView: View {\n    private let items: [String] = [\"One\", \"Two\", \"Three\", \"Four\", \"Five\"]\n    @State private var selectedIndex: Int = 2\n    \n    var body: some View {\n        CarouselView(\n            items,\n            spacing: 10.0,\n            selectedIndex: $selectedIndex\n        ) { item in\n            Text(item)\n                .frame(maxWidth: .infinity)\n                .frame(height: 200)\n                .background(Color.gray)\n                .clipShape(RoundedRectangle(cornerSize: .init(width: 5, height: 5)))\n        }\n    }\n}\n```\n\n### Auto-scroll\n```swift\nstruct ContentView: View {\n    private let items: [String] = [\"One\", \"Two\", \"Three\", \"Four\", \"Five\"]\n    @State private var selectedIndex: Int = 0\n    @State private var autoScrollEnabled: Bool = true\n    \n    var body: some View {\n        CarouselView(\n            items,\n            spacing: 10.0,\n            selectedIndex: $selectedIndex\n        ) { item in\n            Text(item)\n                .frame(maxWidth: .infinity)\n                .frame(height: 200)\n                .background(Color.blue)\n                .clipShape(RoundedRectangle(cornerSize: .init(width: 5, height: 5)))\n        }\n        .autoscroll($autoScrollEnabled, interval: 3.0)\n    }\n}\n```\n\nAuto-scroll automatically pauses when the user interacts with the carousel and resumes when interaction ends.\n\n### Observing User Interaction\n```swift\nstruct ContentView: View {\n    private let items: [String] = [\"One\", \"Two\", \"Three\", \"Four\", \"Five\"]\n    @State private var selectedIndex: Int = 0\n    \n    var body: some View {\n        CarouselView(\n            items,\n            spacing: 10.0,\n            selectedIndex: $selectedIndex\n        ) { item in\n            Text(item)\n                .frame(maxWidth: .infinity)\n                .frame(height: 200)\n                .background(Color.blue)\n                .clipShape(RoundedRectangle(cornerSize: .init(width: 5, height: 5)))\n        }\n        .onCarouselInteraction { isInteracting in\n            print(\"User is interacting: \\(isInteracting)\")\n        }\n    }\n}\n```\n\n## Author\n\n[Anbalagan D](mailto:anbu94p@gmail.com)\n\n## License\n\nCarouselView 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%2Fanbalagand%2Fcarouselview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanbalagand%2Fcarouselview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanbalagand%2Fcarouselview/lists"}