{"id":13462687,"url":"https://github.com/omaralbeik/Drops","last_synced_at":"2025-03-25T05:32:12.771Z","repository":{"id":37457446,"uuid":"362044566","full_name":"omaralbeik/Drops","owner":"omaralbeik","description":"A µFramework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil","archived":false,"fork":false,"pushed_at":"2024-10-11T16:52:22.000Z","size":11287,"stargazers_count":993,"open_issues_count":3,"forks_count":52,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-23T10:47:32.748Z","etag":null,"topics":["accessibility","alert","carthage","cocoapods","ios","swift","swift-package","swiftui","ui-framework","uikit","voiceover","xcode"],"latest_commit_sha":null,"homepage":"https://omaralbeik.github.io/Drops","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/omaralbeik.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":"2021-04-27T08:52:16.000Z","updated_at":"2025-03-19T11:41:53.000Z","dependencies_parsed_at":"2024-11-28T20:04:10.632Z","dependency_job_id":"3ce33774-6f0c-404f-a00e-4d9409cf5093","html_url":"https://github.com/omaralbeik/Drops","commit_stats":{"total_commits":45,"total_committers":9,"mean_commits":5.0,"dds":0.2666666666666667,"last_synced_commit":"f4eabe3e4e5da69e5205a69a5ddc0effd4a90519"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaralbeik%2FDrops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaralbeik%2FDrops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaralbeik%2FDrops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaralbeik%2FDrops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omaralbeik","download_url":"https://codeload.github.com/omaralbeik/Drops/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407535,"owners_count":20610226,"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":["accessibility","alert","carthage","cocoapods","ios","swift","swift-package","swiftui","ui-framework","uikit","voiceover","xcode"],"created_at":"2024-07-31T13:00:18.933Z","updated_at":"2025-03-25T05:32:11.681Z","avatar_url":"https://github.com/omaralbeik.png","language":"Swift","readme":"# Drops 💧\n\nA µFramework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil.\n\n![Demo](https://raw.githubusercontent.com/omaralbeik/Drops/main/Assets/demo.gif)\n\n---\n\n[![CI](https://github.com/omaralbeik/Drops/workflows/Drops/badge.svg)](https://github.com/omaralbeik/Drops/actions)\n[![codecov](https://codecov.io/gh/omaralbeik/Drops/branch/main/graph/badge.svg?token=399UQIKSLR)](https://codecov.io/gh/omaralbeik/Drops)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fomaralbeik%2FDrops%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/omaralbeik/Drops)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fomaralbeik%2FDrops%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/omaralbeik/Drops)\n## Features\n\n- iOS 13+\n- Can be used in SwiftUI and UIKit applications\n- Light/Dark modes\n- Interactive dismissal\n- Queue to show consecutive drops\n- Support dynamic font sizing\n- Support announcing title and subtitle via VoiceOver\n- Show from top or bottom of screen\n\n---\n\n## Usage\n\n1. Create a drop:\n\n```swift\nlet drop: Drop = \"Title Only\"\n```\n\n```swift\nlet drop = Drop(title: \"Title Only\")\n```\n\n```swift\nlet drop = Drop(title: \"Title\", subtitle: \"Subtitle\")\n```\n\n```swift\nlet drop = Drop(title: \"Title\", subtitle: \"Subtitle\", duration: 5.0)\n```\n\n```swift\nlet drop = Drop(\n    title: \"Title\",\n    subtitle: \"Subtitle\",\n    icon: UIImage(systemName: \"star.fill\"),\n    action: .init {\n        print(\"Drop tapped\")\n        Drops.hideCurrent()\n    },\n    position: .bottom,\n    duration: 5.0,\n    accessibility: \"Alert: Title, Subtitle\"\n)\n```\n\n2. Show it:\n\n```swift\nDrops.show(\"Title\")\n```\n\n```swift\nDrops.show(drop)\n```\n\n###### SwiftUI\n```swift\nimport SwiftUI\nimport Drops\n\nstruct ContentView: View {\n    var body: some View {\n        Button(\"Show Drop\") {\n            Drops.show(drop)\n        }\n    }\n}\n```\n\n###### UIKit\n```swift\nimport UIKit\nimport Drops\n\nclass ViewController: UIViewController {\n    let drops = Drops(delayBetweenDrops: 1.0)\n\n    func showDrop() {\n        drops.show(drop)\n    }\n}\n```\n\nRead the [docs](https://omaralbeik.github.io/Drops) for more usage options.\n\n---\n\n## Example Projects\n\n- Run the `SwiftUIExample` target to see how Drops works in SwiftUI applications.\n- Run the `UIKitExample` target to see how Drops works in UIKit applications.\n\n![Example](https://raw.githubusercontent.com/omaralbeik/Drops/main/Assets/example.png)\n\n---\n\n## Installation\n\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code.\n\n1. Add the following to your `Package.swift` file:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/omaralbeik/Drops.git\", from: \"1.7.0\")\n]\n```\n\n2. Build your project:\n\n```sh\n$ swift build\n```\n\n### CocoaPods\n\nTo integrate Drops into your Xcode project using [CocoaPods](https://cocoapods.org), specify it in your Podfile:\n\n```rb\npod 'Drops', :git =\u003e 'https://github.com/omaralbeik/Drops.git', :tag =\u003e '1.7.0'\n```\n\n### Carthage\n\nTo integrate Drops into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your Cartfile:\n\n```\ngithub \"omaralbeik/Drops\" ~\u003e 1.7.0\n```\n\n### Manually\n\nAdd the [Sources](https://github.com/omaralbeik/Drops/tree/main/Sources) folder to your Xcode project.\n\n---\n\n## Thanks\n\nSpecial thanks to [SwiftKickMobile team](https://github.com/SwiftKickMobile) for creating [SwiftMessages](https://github.com/SwiftKickMobile/SwiftMessages), this project was heavily inspired by their work.\n\n---\n\n## License\n\nDrops is released under the MIT license. See [LICENSE](https://github.com/omaralbeik/Drops/blob/main/LICENSE) for more information.\n","funding_links":[],"categories":["Toast-and-Popup","Swift","UI Component"],"sub_categories":["Content"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomaralbeik%2FDrops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomaralbeik%2FDrops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomaralbeik%2FDrops/lists"}