{"id":29292768,"url":"https://github.com/ceviixx/pillkit","last_synced_at":"2026-01-20T16:26:16.966Z","repository":{"id":303047861,"uuid":"1014242124","full_name":"ceviixx/PillKit","owner":"ceviixx","description":"SwiftUI overlay banner mimicking iOS system alerts like AirPods connection or mute switch – animated, draggable, and haptics-ready.","archived":false,"fork":false,"pushed_at":"2025-07-05T10:39:59.000Z","size":1919,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-19T08:16:21.646Z","etag":null,"topics":["airpods","apple-style","banner","drag-to-dismiss","floating-banner","haptics","ios","mute-switch","overlay","swift-package","swiftui","system-notification","toast"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ceviixx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-07-05T10:24:15.000Z","updated_at":"2025-07-05T10:40:13.000Z","dependencies_parsed_at":"2025-07-05T11:49:00.015Z","dependency_job_id":null,"html_url":"https://github.com/ceviixx/PillKit","commit_stats":null,"previous_names":["ceviixx/pillkit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ceviixx/PillKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceviixx%2FPillKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceviixx%2FPillKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceviixx%2FPillKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceviixx%2FPillKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceviixx","download_url":"https://codeload.github.com/ceviixx/PillKit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceviixx%2FPillKit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"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":["airpods","apple-style","banner","drag-to-dismiss","floating-banner","haptics","ios","mute-switch","overlay","swift-package","swiftui","system-notification","toast"],"created_at":"2025-07-06T10:09:52.841Z","updated_at":"2026-01-20T16:26:16.937Z","avatar_url":"https://github.com/ceviixx.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PillKit\n\n[![SwiftPM Compatible](https://img.shields.io/badge/SwiftPM-Compatible-orange?logo=swift)](https://swift.org/package-manager/)\n![iOS](https://img.shields.io/badge/iOS-18%2B-blue)\n![SwiftUI](https://img.shields.io/badge/SwiftUI-purple?logo=swift)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Latest Release](https://img.shields.io/github/v/release/ceviixx/PillKit)](https://github.com/ceviixx/PillKit/releases)\n![Release Date](https://img.shields.io/github/release-date/ceviixx/PillKit)\n\n**PillKit** is a lightweight SwiftUI overlay banner inspired by native iOS system indicators – like the floating notification you see when **connecting AirPods**, **toggling the mute switch**, or **activating a Focus mode**.\n\nApple doesn’t provide any public API to recreate this behavior, so **PillKit** gives you an easy way to implement a similar experience with animation, drag-to-dismiss, and haptic feedback. Fully usable from anywhere – even outside SwiftUI views.\n\n## Features\n\n- ✅ Show banners from anywhere – even outside SwiftUI views\n- ✅ Animated slide-in from top with fade\n- ✅ Auto-dismiss after timeout\n- ✅ Draggable: swipe up to dismiss interactively\n- ✅ Optional haptic feedback for `.success`, `.failure`, or `.custom`\n- ✅ Does not block UI or touch interaction\n- ✅ Supports `.success`, `.failure`, `.default(...)` or `.custom(...)` content\n- ✅ Content-size based width with optional max width\n- ✅ Global API usable from view models, services, AppDelegate, etc.\n\n---\n\n## Preview\n\n|✅ Success|❌ Failure|🔔 Custom|\n|----------|----------|---------|\n|\u003cimg src=\"Assets/Success.gif\"/\u003e|\u003cimg src=\"Assets/Failure.gif\"/\u003e|\u003cimg src=\"Assets/Custom.gif\"/\u003e|\n\n---\n\n## Installation\n\n### Swift Package Manager\n\nIn Xcode:\n\n- File → Add Packages...\n- Use URL:\n\n```text\nhttps://github.com/ceviixx/PillKit.git\n```\n\n---\n\n## Usage\n\n### Show a success or failure banner\n\n```swift\nimport PillKit\n\nPillPresenter.show(.success(title: \"Upload complete\"))\nPillPresenter.show(.failure(title: \"Something went wrong\"))\n```\n\n### Show with custom haptic\n\n```swift\nPillPresenter.show(.success(title: \"Saved!\", haptic: .light))\nPillPresenter.show(.failure(title: \"Error!\", haptic: .none))\n```\n\n### Show a custom banner\n\n```swift\nPillPresenter.show(.custom(\n    view: AnyView(\n        VStack {\n            Text(\"🔔 Notification\")\n                .font(.headline)\n            Text(\"This is a custom view.\")\n        }\n        .padding()\n        .background(.thinMaterial)\n        .cornerRadius(12)\n    ),\n    haptic: .soft\n))\n```\n\n### Show a `.default` banner with custom color and icon\n\n```swift\nPillPresenter.show(.default(\n    title: \"New Feature\",\n    message: \"Check out what's new!\",\n    systemImage: \"sparkles\",\n    color: Color.blue.opacity(0.2),\n    haptic: .light\n))\n```\n\n### Show a `.default` banner without icon or message\n\n```swift\nPillPresenter.show(.default(\n    title: \"Something happened\"\n))\n```\n\n### Show a `.default` banner with dark background\n\n```swift\nPillPresenter.show(.default(\n    title: \"Heads up\",\n    message: \"This is a dark alert\",\n    systemImage: \"bolt.trianglebadge.exclamationmark\",\n    color: Color.black.opacity(0.85),\n    haptic: .rigid\n))\n```\n\n---\n\n## Options\n\n```swift\nPillPresenter.show(\n    .success(title: \"Saved!\"),\n    autoHideEnabled: true,  // default: true\n    duration: 3             // seconds\n)\n```\n\n---\n\n## Global Settings\n\n```swift\nPillPresenter.hapticsEnabled = false  // disables all haptics globally\n```\n\n---\n\n## Behavior\n\n- Appears at the top of the screen\n- Automatically hides after `duration` unless `autoHideEnabled = false`\n- Can be manually dismissed with `PillPresenter.hide()`\n- Can be dragged upward by the user to dismiss interactively\n- Works over sheets, fullScreenCover, and navigation stacks\n- Does not block interaction with views underneath\n\n---\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceviixx%2Fpillkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceviixx%2Fpillkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceviixx%2Fpillkit/lists"}