Swiftpack.co - omaralbeik/Drops as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
omaralbeik/Drops 1.4.0
A µFramework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil
⭐️ 218
🕓 1 week ago
.package(url: "https://github.com/omaralbeik/Drops.git", from: "1.4.0")

Drops 💧

A µFramework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil.


CI codecov


  • iOS 10+
  • Can be used in SwiftUI and UIKit applications
  • Light/Dark modes
  • Interactive dismissal
  • Queue to show consecutive drops
  • Support dynamic font sizing
  • Support announcing title and subtitle via VoiceOver
  • Show from top or bottom of screen


  1. Create a drop:
let drop: Drop = "Title Only"
let drop = Drop(title: "Title Only")
let drop = Drop(title: "Title", subtitle: "Subtitle")
let drop = Drop(title: "Title", subtitle: "Subtitle", duration: 5.0)
let drop = Drop(
    title: "Title",
    subtitle: "Subtitle",
    icon: UIImage(systemName: "star.fill"),
    action: .init {
        print("Drop tapped")
    position: .bottom,
    duration: 5.0,
    accessibility: "Alert: Title, Subtitle"
  1. Show it:
import SwiftUI
import Drops

struct ContentView: View {
    var body: some View {
        Button("Show Drop") {
import UIKit
import Drops

class ViewController: UIViewController {
    let drops = Drops(delayBetweenDrops: 1.0)

    func showDrop() {

Read the docs for more usage options.

Example Projects

  • Run the SwiftUIExample target to see how Drops works in SwiftUI applications.
  • Run the UIKitExample target to see how Drops works in UIKit applications.



Swift Package Manager

The Swift Package Manager is a tool for managing the distribution of Swift code.

  1. Add the following to your Package.swift file:
dependencies: [
    .package(url: "https://github.com/omaralbeik/Drops.git", from: "1.4.0")
  1. Build your project:
$ swift build


To integrate Drops into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Drops', :git => 'https://github.com/omaralbeik/Drops.git', :tag => '1.4.0'


To integrate Drops into your Xcode project using Carthage, specify it in your Cartfile:

github "omaralbeik/Drops" ~> 1.2


Add the Sources folder to your Xcode project.


Special thanks to SwiftKickMobile team for creating SwiftMessages, this project was heavily inspired by their work.


Drops is released under the MIT license. See LICENSE for more information.


Stars: 219
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

1 week ago

Change Log


  • Added a customisation of maximum number of lines for title and subtitle #23
  • Added new willShowDrop, didShowDrop, willDismissDrop, and didDismissDrop handlers #24 #29

Great thanks to @ky1vstar for their contributions 👏

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics