{"id":13779023,"url":"https://github.com/maustinstar/swiftui-drawer","last_synced_at":"2025-04-04T07:08:52.732Z","repository":{"id":44614290,"uuid":"279685167","full_name":"maustinstar/swiftui-drawer","owner":"maustinstar","description":"A SwiftUI bottom-up controller, like in the Maps app. Drag to expand or minimize.","archived":false,"fork":false,"pushed_at":"2022-03-21T19:26:29.000Z","size":3457,"stargazers_count":927,"open_issues_count":8,"forks_count":36,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-11T21:43:35.774Z","etag":null,"topics":["ios","macos","swift5","swiftui","ui","ui-components","ux"],"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/maustinstar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["maustinstar"]}},"created_at":"2020-07-14T20:21:18.000Z","updated_at":"2024-10-11T15:56:02.000Z","dependencies_parsed_at":"2022-08-25T19:01:46.264Z","dependency_job_id":null,"html_url":"https://github.com/maustinstar/swiftui-drawer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maustinstar%2Fswiftui-drawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maustinstar%2Fswiftui-drawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maustinstar%2Fswiftui-drawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maustinstar%2Fswiftui-drawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maustinstar","download_url":"https://codeload.github.com/maustinstar/swiftui-drawer/tar.gz/refs/heads/master","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":["ios","macos","swift5","swiftui","ui","ui-components","ux"],"created_at":"2024-08-03T18:01:00.155Z","updated_at":"2025-04-04T07:08:52.704Z","avatar_url":"https://github.com/maustinstar.png","language":"Swift","funding_links":["https://github.com/sponsors/maustinstar"],"categories":["Sheet","Swift","UI"],"sub_categories":["Content","Drawer"],"readme":"# SwiftUI Drawer\n\nA SwiftUI bottom-up controller, like in the Maps app. Drag to expand or minimize.\n\n\u003cimg src=https://raw.githubusercontent.com/maustinstar/swiftui-drawer/master/Docs/Media/white-drawer.gif width=200 align=\"right\" /\u003e\n\n## Contents\n\n- [Add the Package](#package)\n- [Basic Usage](#basic-usage)\n- [Examples](#examples)\n- [Credits](#credits)\n\n## Package\n\n### For Xcode Projects\n\nFile \u003e Swift Packages \u003e Add Package Dependency: https://github.com/maustinstar/swiftui-drawer\n\n### For Swift Packages\n\nAdd a dependency in your your `Package.swift`\n\n```swift\n.package(url: \"https://github.com/maustinstar/swiftui-drawer.git\", from: \"0.1.0\"),\n```\n\n## Basic Usage\n\nEmbed your view content in a `ZStack` with the Drawer as the last element. The `heights` parameter defines a list of resting heights for the drawer.\n\n```swift\nZStack {\n\n    ScrollView {\n        //...\n    }\n    \n    Drawer(heights: [100, 340]) {\n        Color.blue\n    }.edgesIgnoringSafeArea(.vertical)\n}\n```\n\n**See the full [Reference Guide](https://github.com/maustinstar/swiftui-drawer/blob/master/Docs/Reference.md).**\n\n## Examples\n\n\u003cimg src=https://raw.githubusercontent.com/maustinstar/swiftui-drawer/master/Docs/Media/white-drawer.gif width=200 align=\"right\" /\u003e\n\nA multi-height drawer with haptic impact.\n\n```swift\nDrawer {\n    ZStack {\n        \n        RoundedRectangle(cornerRadius: 12)\n            .foregroundColor(.white)\n            .shadow(radius: 100)\n        \n        VStack(alignment: .center) {\n            Spacer().frame(height: 4.0)\n            RoundedRectangle(cornerRadius: 3.0)\n                .foregroundColor(.gray)\n                .frame(width: 30.0, height: 6.0)\n            Spacer()\n        }\n    }\n}.edgesIgnoringSafeArea(.vertical)\n.rest(at: .constant([100, 340, UIScreen.main.bounds.height - 40]))\n.impact(.light)\n```\n**See more [Examples](https://github.com/maustinstar/swiftui-drawer/blob/master/Docs/Examples.md)**\n\n## 🚀 Looking for more fun SwiftUI Packages?\n\n**Take your SwiftUI apps to the next level with these Packages!**\n\n\u003ca href=\"https://github.com/maustinstar/shiny\"\u003e\n  \u003cimg src=\"https://github-readme-stats.vercel.app/api/pin/?username=maustinstar\u0026repo=shiny\" height=130 align=\"left\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/maustinstar/liquid\"\u003e\n  \u003cimg src=\"https://github-readme-stats.vercel.app/api/pin/?username=maustinstar\u0026repo=liquid\" height=130 /\u003e\n\u003c/a\u003e\n\n## Credits\n\n* [**Michael Verges**](https://github.com/maustinstar) - *Initial work* - mverges3@gatech.edu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaustinstar%2Fswiftui-drawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaustinstar%2Fswiftui-drawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaustinstar%2Fswiftui-drawer/lists"}