{"id":22368527,"url":"https://github.com/wouter125/bottomsheet","last_synced_at":"2025-04-04T07:07:41.244Z","repository":{"id":38440574,"uuid":"468503486","full_name":"Wouter125/BottomSheet","owner":"Wouter125","description":"An iOS library for SwiftUI to create draggable sheet experiences similar to iOS applications like Maps and Stocks.","archived":false,"fork":false,"pushed_at":"2024-12-16T12:47:59.000Z","size":87,"stargazers_count":213,"open_issues_count":5,"forks_count":22,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-28T06:08:28.295Z","etag":null,"topics":["bottomsheet","ios","sheet","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/Wouter125.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":"2022-03-10T20:39:57.000Z","updated_at":"2025-03-25T05:45:53.000Z","dependencies_parsed_at":"2023-01-31T12:02:02.105Z","dependency_job_id":"be45a9e9-14eb-450c-8c65-e8550a23adbe","html_url":"https://github.com/Wouter125/BottomSheet","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wouter125%2FBottomSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wouter125%2FBottomSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wouter125%2FBottomSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wouter125%2FBottomSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wouter125","download_url":"https://codeload.github.com/Wouter125/BottomSheet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135144,"owners_count":20889421,"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":["bottomsheet","ios","sheet","swift","swiftui"],"created_at":"2024-12-04T18:35:00.674Z","updated_at":"2025-04-04T07:07:41.224Z","avatar_url":"https://github.com/Wouter125.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BottomSheet\n\nAn iOS library for SwiftUI to create draggable sheet experiences similar to iOS applications like Maps and Stocks. \n\n## Feature overview \n\nThe library currently supports;\n\n- [x] Unlimited snap positions\n- [x] Realtime position callback\n- [x] Absolute and relative positioning\n- [x] Customizable animation parameters\n- [x] An optional sticky header\n- [x] Views with and without a scrollview\n\n## How to install\n\nCurrently BottomSheet is only available through the [Swift Package Manager](https://swift.org/package-manager/) or manual install. \n\n1. Installation through Swift Package Manager can be done by going to `File \u003e Add Packages`. Then enter the following URL in the searchbar; `https://github.com/Wouter125/BottomSheet`.\n\n2. Manual installation can be done by cloning this repository and dragging all assets into your Xcode Project.\n\n## How to use\n\n1. Import BottomSheet\n\n2. Create a state property that contains the presentation state of the bottom sheet and one for the current selection;\n\n```\n@Published var isPresented = false\n@Published var selectedDetent: BottomSheet.PresentationDetent = .medium\n```\n\n4. Add the `BottomSheetView` to your SwiftUI view hierachy by using a view modifier;\n\n```\n.sheetPlus(\n    isPresented: $isPresented,\n    header: { },\n    main: { \n        EmptyView()\n            .presentationDetentsPlus(\n                [.height(244), .fraction(0.4), .medium, .large],\n                selection: $selectedDetent\n            )\n    }\n)\n```\n\n5. Optionally receive the current panel position with a callback, change the background color, show a drag indicator or limit the background interaction based on the height;\n```\n.sheetPlus(\n    isPresented: $isPresented,\n    background: (\n        Color(UIColor.secondarySystemBackground)\n    ),\n    onDrag: { translation in\n        print(translation)\n    },\n    header: { EmptyView() },\n    main: {\n        EmptyView()\n            .presentationDetentsPlus(\n                [.height(244), .fraction(0.4), .medium, .large],\n                selection: $selectedDetent\n            )\n            .presentationDragIndicatorPlus(.visible)\n            .presentationBackgroundInteractionPlus(.enabled(upThrough: .height(380)))\n    }\n)\n```\n\n## Interface\n\n| Modifier                 | Type                | Default | Description                                                                       |\n|--------------------------|---------------------|---------|-----------------------------------------------------------------------------------|\n| animationCurve.mass      | Double              | 1.2     | The mass of the object attached to the spring.                                    |\n| animationCurve.stiffness | Double              | 200     | The stiffness of the spring.                                                      |\n| animationCurve.damping   | Double              | 25      | The spring damping value.                                                         |\n\n## Example\n\nTo give you an idea of how to use this library you can use the example that is attached to this repo. Simply clone it and open the `BottomSheetExample` folder in Xcode.\n\n## Roadmap\n\n1. Add landscape support\n2. Add iPad support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwouter125%2Fbottomsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwouter125%2Fbottomsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwouter125%2Fbottomsheet/lists"}