{"id":17304207,"url":"https://github.com/ericlewis/pagesheet","last_synced_at":"2025-08-09T19:52:33.835Z","repository":{"id":44643573,"uuid":"453807059","full_name":"ericlewis/PageSheet","owner":"ericlewis","description":"Customizable sheets using UISheetPresentationController in SwiftUI","archived":false,"fork":false,"pushed_at":"2023-05-02T16:05:36.000Z","size":56,"stargazers_count":55,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T17:49:15.048Z","etag":null,"topics":["bottom-sheet","bottomsheet","cocoapods","ios","ios15","modals","popover","presentation","sheets","swift","swiftui","uikit"],"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/ericlewis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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-01-30T21:30:36.000Z","updated_at":"2024-03-07T03:07:44.000Z","dependencies_parsed_at":"2024-10-28T14:26:06.074Z","dependency_job_id":"fed3e665-da1d-4786-bef1-cc54d0c1e416","html_url":"https://github.com/ericlewis/PageSheet","commit_stats":{"total_commits":52,"total_committers":1,"mean_commits":52.0,"dds":0.0,"last_synced_commit":"ef3e63d891cdd5af91d356871906e283b9b4644f"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlewis%2FPageSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlewis%2FPageSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlewis%2FPageSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlewis%2FPageSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericlewis","download_url":"https://codeload.github.com/ericlewis/PageSheet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244236061,"owners_count":20420753,"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":["bottom-sheet","bottomsheet","cocoapods","ios","ios15","modals","popover","presentation","sheets","swift","swiftui","uikit"],"created_at":"2024-10-15T11:52:27.367Z","updated_at":"2025-07-10T10:33:19.968Z","avatar_url":"https://github.com/ericlewis.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PageSheet\n\n# NOTE: This repo isn't maintained due to swiftui taking on *most* of the features we supported here. Happy to hand the repo to someone who really does need it.\n\n[![](https://img.shields.io/badge/Swift_Package_Manager-compatible-ed702d.svg?style=flat)](https://github.com/apple/swift-package-manager)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fericlewis%2FPageSheet%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/ericlewis/PageSheet)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fericlewis%2FPageSheet%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/ericlewis/PageSheet)\n\n#### Customizable sheet presentations in SwiftUI. Using [`UISheetPresentationController`](https://developer.apple.com/documentation/uikit/uisheetpresentationcontroller) under the hood.\n\n### Features\n- Uses the default [`sheet`](https://developer.apple.com/documentation/swiftui/view/sheet(ispresented:ondismiss:content:)) API under the hood, ensuring maximum compatibility \u0026 stability.\n- Exposes the *exact same* API as the default SwiftUI [`sheet`](https://developer.apple.com/documentation/swiftui/view/sheet(ispresented:ondismiss:content:)) implementation.\n- No hacks, follows the best practices for creating representable views in SwiftUI.\n- Configurable using view modifiers, can configure [`UISheetPresentationController`](https://developer.apple.com/documentation/uikit/uisheetpresentationcontroller)\n  from any child views in the presented sheet's content view.\n- Works with the [`interactiveDismissDisabled(_:Bool)`](https://developer.apple.com/documentation/swiftui/view/interactivedismissdisabled(_:)) modifier.\n- Exposes all of the [`UISheetPresentationController`](https://developer.apple.com/documentation/uikit/uisheetpresentationcontroller) configuration options.\n- Track the currently selected detent using an [`Environment`](https://developer.apple.com/documentation/swiftui/environment) value. \n- [Well documented API](#documentation), following a similar approach to the Developer Documentation.\n- Small footprint, [`~44kB`](https://www.emergetools.com/) thin when installed via SwiftPM.\n\n## Table of Contents\n* [Requirements](#requirements)\n* [Installation](#installation)\n  * [Xcode](#xcode)\n  * [Swift Package Manager](#swift-package-manager)\n* [Examples](#examples)\n  * [Example Project](#example-project)\n  * [Presentation](#presentation)\n  * [Customization](#customization)\n* [Module Documentation](#module-documentation)\n  * [PageSheet](#pagesheet)\n  * [PageSheetCore](https://pagesheetcore.swifty.sh/documentation/)\n  * [PageSheetPlus](https://pagesheetplus.swifty.sh/documentation/)\n* [License](#license)\n\n# Requirements\nThe codebase supports iOS and requires Xcode 12.0 or newer\n\n# Installation\n## Xcode\nOpen your project. Navigate to `File \u003e Swift Packages \u003e Add Package Dependency`. Enter the url `https://github.com/ericlewis/PageSheet` and tap `Next`.\nSelect the `PageSheet` target and press `Add Package`.\n\n## Swift Package Manager\nAdd the following line to the `dependencies` in your `Package.swift` file:\n```swift\n.package(url: \"https://github.com/ericlewis/PageSheet.git\", .upToNextMajor(from: \"1.0.0\"))\n```\nNext, add `PageSheet` as a dependency for your targets:\n```swift\n.target(name: \"AppTarget\", dependencies: [\"PageSheet\"])\n```\nA completed example may look like this:\n```swift\n// swift-tools-version:5.5\n\nimport PackageDescription\n\nlet package = Package(\n    name: \"App\",\n    dependencies: [\n        .package(\n          url: \"https://github.com/ericlewis/PageSheet.git\", \n          .upToNextMajor(from: \"1.0.0\"))\n    ],\n    targets: [\n        .target(\n          name: \"AppTarget\", \n          dependencies: [\"PageSheet\"])\n    ]\n)\n```\n\n# Examples\n## Example Project\nIf you are using Xcode 13.2.1 you can navigate to the [`Example`](Example) folder and open the enclosed Swift App Playground to test various features (and see how they are implemented).\n\n## Presentation\n`PageSheet` works similarly to a typical [`sheet`](https://developer.apple.com/documentation/SwiftUI/View/sheet(isPresented:onDismiss:content:)) view modifier.\n```swift\nimport SwiftUI\nimport PageSheet\n\nstruct ContentView: View {\n  @State\n  private var sheetPresented = false\n  \n  var body: some View {\n    Button(\"Open Sheet\") {\n      sheetPresented = true\n    }\n    .pageSheet(isPresented: $sheetPresented) {\n      Text(\"Hello!\")\n    }\n  }\n}\n```\n\n`PageSheet` also supports presentation via conditional `Identifiable` objects.\n```swift\nimport SwiftUI\nimport PageSheet\n\nstruct ContentView: View {\n  @State\n  private var string: String?\n  \n  var body: some View {\n    Button(\"Open Sheet\") {\n      string = \"Hello!\"\n    }\n    .pageSheet(item: $string) { unwrappedString in\n      Text(unwrappedString)\n    }\n  }\n}\n\nextension String: Identifiable {\n  public var id: String { self }\n}\n```\n\n### Customization\n`PageSheet` can also be customized using a collection of view modifiers applied to the sheet's content.\n```swift\nimport SwiftUI\nimport PageSheet\n\nstruct ContentView: View {\n  @State\n  private var sheetPresented = false\n  \n  var body: some View {\n    Button(\"Open Sheet\") {\n      sheetPresented = true\n    }\n    .pageSheet(isPresented: $sheetPresented) {\n      Text(\"Hello!\")\n        .preferGrabberVisible(true)\n    }\n  }\n}\n```\n\n# Module Documentation\n### PageSheet\n`PageSheet` is split into three different modules, with `PageSheetCore` handling implementation\nand `PageSheetPlus` providing a new modifier called `sheetPreferences(_:)`. \nThe namesake module is `PageSheet`, which combines `PageSheetCore` \u0026 `PageSheetPlus` into a single import.\n\nIf you want to only use PageSheet without the fancy extra modifier (and [extra dependency](https://github.com/ericlewis/ViewModifierBuilder)), then use `PageSheetCore`.\n### [PageSheetCore](https://pagesheetcore.swifty.sh/documentation/)\n### [PageSheetPlus](https://pagesheetplus.swifty.sh/documentation/)\n\n# License\nPageSheet is released under the MIT license. See [LICENSE](LICENSE.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlewis%2Fpagesheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericlewis%2Fpagesheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlewis%2Fpagesheet/lists"}