{"id":18184252,"url":"https://github.com/iiaremenko/draggablepopover","last_synced_at":"2026-01-29T22:02:23.460Z","repository":{"id":260816034,"uuid":"882412326","full_name":"iiaremenko/DraggablePopover","owner":"iiaremenko","description":"A SwiftUI modifier that adds a draggable popover to any view, allowing the popover to stick to the corners of the parent view, similar to the Picture-in-Picture (PiP) behavior in iOS.","archived":false,"fork":false,"pushed_at":"2024-11-02T19:05:29.000Z","size":7250,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T19:05:16.998Z","etag":null,"topics":["pip","popover","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/iiaremenko.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-02T18:30:07.000Z","updated_at":"2025-02-24T05:30:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7d3c4b9-2eef-4a5d-8212-b022bc570a1b","html_url":"https://github.com/iiaremenko/DraggablePopover","commit_stats":null,"previous_names":["iiaremenko/draggablepopover"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iiaremenko/DraggablePopover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiaremenko%2FDraggablePopover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiaremenko%2FDraggablePopover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiaremenko%2FDraggablePopover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiaremenko%2FDraggablePopover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iiaremenko","download_url":"https://codeload.github.com/iiaremenko/DraggablePopover/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiaremenko%2FDraggablePopover/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28886881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T21:06:44.224Z","status":"ssl_error","status_checked_at":"2026-01-29T21:06:42.160Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["pip","popover","swiftui"],"created_at":"2024-11-02T21:03:45.340Z","updated_at":"2026-01-29T22:02:23.453Z","avatar_url":"https://github.com/iiaremenko.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PopoverDraggable\n\nA SwiftUI modifier that adds a draggable popover to any view, allowing the popover to stick to the corners of the parent view, similar to the Picture-in-Picture (PiP) behavior in iOS. The popover can be moved around the screen by dragging and snaps to the nearest corner when released. Works well on iPad.\n\nhttps://github.com/user-attachments/assets/3eb3921d-bc9f-4515-a832-b2563016d787\n\n\n![Portrait demo](https://github.com/user-attachments/assets/c8bfa334-b55a-4968-830c-27e4ba494e65)\n\n\n## Features\n\n- Draggable popover that snaps to the nearest corner\n- Customizable content inside the popover\n- Optional action triggered when tapping outside the popover\n- Automatically adjusts position to avoid covering the keyboard\n\n## Requirements\n\n- iOS 14.0+\n- SwiftUI\n\n## Usage\n\nTo use the `popoverDraggable` modifier, simply attach it to any SwiftUI view you want to display a popover from.\n\n### Example\n\n```swift\nimport SwiftUI\n\nstruct ContentView: View {\n    @State private var isPopoverPresented = true\n    @State private var popoverAlignment = Alignment.topLeading\n\n    var body: some View {\n        Color.red\n            .edgesIgnoringSafeArea(.all)\n            .popoverDraggable(\n                isPresented: $isPopoverPresented,\n                alignment: $popoverAlignment,\n                outsideTapped: { print(\"Outside tapped\") }\n            ) {\n                Text(\"Popover Content\")\n                    .padding()\n                    .background(Color.white)\n                    .cornerRadius(8)\n            }\n    }\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiiaremenko%2Fdraggablepopover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiiaremenko%2Fdraggablepopover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiiaremenko%2Fdraggablepopover/lists"}