[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6912":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":34,"discoverSource":35},6912,"PopupView","exyte\u002FPopupView","exyte","Toasts and popups library written with SwiftUI","",null,"Swift",4043,313,23,2,0,3,13,1,29.49,"MIT License",false,"master",true,[26,27,28,29,30],"popup","swiftui","swiftui-components","swiftui-framework","toast","2026-06-12 02:01:31","\u003Ca href=\"https:\u002F\u002Fexyte.com\u002F\">\u003Cpicture>\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002Fcommon\u002Fheader-dark.png\">\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002Fcommon\u002Fheader-light.png\">\u003C\u002Fpicture>\u003C\u002Fa>\n\n\u003Ca href=\"https:\u002F\u002Fexyte.com\u002F\">\u003Cpicture>\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002Fcommon\u002Four-site-dark.png\" width=\"80\" height=\"16\">\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002Fcommon\u002Four-site-light.png\" width=\"80\" height=\"16\">\u003C\u002Fpicture>\u003C\u002Fa>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u003Ca href=\"https:\u002F\u002Ftwitter.com\u002FexyteHQ\">\u003Cpicture>\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002Fcommon\u002Ftwitter-dark.png\" width=\"74\" height=\"16\">\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002Fcommon\u002Ftwitter-light.png\" width=\"74\" height=\"16\">\n\u003C\u002Fpicture>\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fexyte.com\u002Fcontacts\">\u003Cpicture>\u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002Fcommon\u002Fget-in-touch-dark.png\" width=\"128\" height=\"24\" align=\"right\">\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002Fcommon\u002Fget-in-touch-light.png\" width=\"128\" height=\"24\" align=\"right\">\u003C\u002Fpicture>\u003C\u002Fa>\n\n\u003Ctable>\n    \u003Cthead>\n        \u003Ctr>\n            \u003Cth>Floaters\u003C\u002Fth>\n            \u003Cth>Toasts\u003C\u002Fth>\n            \u003Cth>Popups\u003C\u002Fth>\n            \u003Cth>Sheets\u003C\u002Fth>\n        \u003C\u002Ftr>\n    \u003C\u002Fthead>\n    \u003Ctbody>\n        \u003Ctr>\n            \u003Ctd>\n                \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002FPopupView\u002F1.gif\" \u002F>\n            \u003C\u002Ftd>\n            \u003Ctd>\n                \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002FPopupView\u002F2.gif\" \u002F>\n            \u003C\u002Ftd>\n            \u003Ctd>\n                \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002FPopupView\u002F3.gif\" \u002F>\n            \u003C\u002Ftd>\n            \u003Ctd>\n                \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fexyte\u002Fmedia\u002Fmaster\u002FPopupView\u002F4.gif\" \u002F>\n            \u003C\u002Ftd>\n        \u003C\u002Ftr>\n    \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\n\u003Cp>\u003Ch1 align=\"left\">Popup View\u003C\u002Fh1>\u003C\u002Fp>\n\n\u003Cp>\u003Ch4>Toasts, alerts and popups library written with SwiftUI\u003C\u002Fh4>\u003C\u002Fp>\n\n\u003Ca href=\"https:\u002F\u002Fexyte.com\u002Fblog\u002Fswiftui-tutorial-popupview-library\">Read Article »\u003C\u002Fa>\n\n![](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Ftag\u002Fexyte\u002FpopupView?label=Version)\n[![](https:\u002F\u002Fimg.shields.io\u002Fendpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fexyte%2FPopupView%2Fbadge%3Ftype%3Dswift-versions)](https:\u002F\u002Fswiftpackageindex.com\u002Fexyte\u002FPopupView)\n[![](https:\u002F\u002Fimg.shields.io\u002Fendpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fexyte%2FPopupView%2Fbadge%3Ftype%3Dplatforms)](https:\u002F\u002Fswiftpackageindex.com\u002Fexyte\u002FPopupView)\n[![SPM](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSPM-Compatible-brightgreen.svg)](https:\u002F\u002Fswiftpackageindex.com\u002Fexyte\u002FPopupView)\n[![Cocoapods](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCocoapods-Deprecated%20after%204.0.0-yellow.svg)](https:\u002F\u002Fcocoapods.org\u002Fpods\u002FExytePopupView)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-black.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n\n# What's new in version 4\nYou can show multiple popups on top of anything, and they can also let the taps pass through to lower views. \nThere are 3 ways to display a popup: as a simple overlay, using SwiftUI's fullscreenSheet, and using UIKit's UIWindow. There are pros and cons for all of these, here is a table.\n\u003Ctable>\n    \u003Cthead>\n        \u003Ctr>\n            \u003Cth>\u003C\u002Fth>\n            \u003Cth>Overlay\u003C\u002Fth>\n            \u003Cth>Sheet\u003C\u002Fth>\n            \u003Cth>Window\u003C\u002Fth>\n        \u003C\u002Ftr>\n    \u003C\u002Fthead>\n    \u003Ctbody>\n        \u003Ctr align=center>\n        \u003Cth>Show on top of navbar\u003C\u002Fth>\n            \u003Ctd> ❌ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr align=center>\n        \u003Cth>Show on top of sheet\u003C\u002Fth>\n            \u003Ctd> ❌ \u003C\u002Ftd>\n            \u003Ctd> ❌ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr align=center>\n        \u003Cth>Show multiple popups\u003C\u002Fth>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ❌ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr align=center>\n        \u003Cth>Taps \"pass through\" the transparent bg\u003C\u002Fth>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ❌ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr align=center>\n        \u003Cth>SwiftUI @State update mechanism works as expected\u003C\u002Fth>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ❌ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n    \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\nBasically UIWindow based popup is the best option for most situations, just remember - to get adequate UI updates, use ObservableObjects or @Bindings instead of @State. This won't work:\n```swift\nstruct ContentView : View {\n    @State var showPopup = false\n    @State var a = false\n\n    var body: some View {\n        Button(\"Button\") {\n            showPopup.toggle()\n        }\n        .popup(isPresented: $showPopup) {\n            VStack {\n                Button(\"Switch a\") {\n                    a.toggle()\n                }\n                a ? Text(\"on\").foregroundStyle(.green) : Text(\"off\").foregroundStyle(.red)\n            }\n        } customize: {\n            $0\n                .type(.floater())\n                .closeOnTap(false)\n                .position(.top)\n        }\n    }\n}\n```\nThis will work:\n```swift\nstruct ContentView : View {\n    @State var showPopup = false\n    @State var a = false\n\n    var body: some View {\n        Button(\"Button\") {\n            showPopup.toggle()\n        }\n        .popup(isPresented: $showPopup) {\n            PopupContent(a: $a)\n        } customize: {\n            $0\n                .type(.floater())\n                .closeOnTap(false)\n                .position(.top)\n        }\n    }\n}\n\nstruct PopupContent: View {\n    @Binding var a: Bool\n\n    var body: some View {\n        VStack {\n            Button(\"Switch a\") {\n                a.toggle()\n            }\n            a ? Text(\"on\").foregroundStyle(.green) : Text(\"off\").foregroundStyle(.red)\n        }\n    }\n}\n```\n\n# Update to version 4\nNew `DisplayMode` enum was introduced instead of `isOpaque`. `isOpaque` is now deprecated.\nInstead of:\n```swift\n.popup(isPresented: $toasts.showingTopSecond) {\n    ToastTopSecond()\n} customize: {\n    $0\n        .type(.toast)\n        .isOpaque(true) \u002F\u002F \u003C-- here\n}\n```\nuse:\n```swift\n.popup(isPresented: $floats.showingTopFirst) {\n    FloatTopFirst()\n} customize: {\n    $0\n        .type(.floater())\n        .displayMode(.sheet) \u002F\u002F \u003C-- here\n}\n```\nSo, new `.displayMode(.sheet)` corresponds to old `.isOpaque(true)`, `.displayMode(.overlay)` corresponds to `.isOpaque(false)`.\nDefault `DisplayMode` is `.window`.\n\n# What's new in version 3\n- zoom in\u002Fout appear\u002Fdisappear animations\n- `disappearTo` parameter to specify disappearing animation direction - can be different from `appearFrom`\n\n# Update to version 3\nTo include new .zoom type, `AppearFrom` enum cases were renamed.\nInstead of:\n```swift\n.popup(isPresented: $floats.showingTopFirst) {\n    FloatTopFirst()\n} customize: {\n    $0\n        .type(.floater())\n        .appearFrom(.top) \u002F\u002F \u003C-- here\n}\n```\nuse:\n```swift\n.popup(isPresented: $floats.showingTopFirst) {\n    FloatTopFirst()\n} customize: {\n    $0\n        .type(.floater())\n        .appearFrom(.topSlide) \u002F\u002F \u003C-- here\n}\n```\n\n# Update to version 2\n\nInstead of:\n```swift\n.popup(isPresented: $floats.showingTopFirst, type: .floater(), position: .top, animation: .spring(), closeOnTapOutside: true, backgroundColor: .black.opacity(0.5)) {\n    FloatTopFirst()\n}\n```\nuse:\n```swift\n.popup(isPresented: $floats.showingTopFirst) {\n    FloatTopFirst()\n} customize: {\n    $0\n        .type(.floater())\n        .position(.top)\n        .animation(.spring())\n        .closeOnTapOutside(true)\n        .backgroundColor(.black.opacity(0.5))\n}\n```\nUsing this API you can pass parameters in any order you like.\n\n# Usage\n1. Add a bool to control popup presentation state\n2. Add `.popup` modifier to your view. \n```swift\nimport PopupView\n\nstruct ContentView: View {\n\n    @State var showingPopup = false\n\n    var body: some View {\n        YourView()\n            .popup(isPresented: $showingPopup) {\n                Text(\"The popup\")\n                    .frame(width: 200, height: 60)\n                    .background(Color(red: 0.85, green: 0.8, blue: 0.95))\n                    .cornerRadius(30.0)\n            } customize: {\n                $0.autohideIn(2)\n            }\n    }\n}\n```\n\n### Required parameters \n`isPresented` - binding to determine if the popup should be seen on screen or hidden     \n`view` - view you want to display on your popup  \n\n#### or\n`item` - binding to item: if item's value is nil - popup is hidden, if non-nil - displayed. Be careful - library makes a copy of your item during dismiss animation!!     \n`view` - view you want to display on your popup  \n\n### Available customizations - optional parameters\nuse `customize` closure in popup modifier:\n\n`type`:\n- `default` - usual popup in the center of screen\n- toast - fitted to screen i.e. without padding and ignoring safe area\n- floater - has padding and can choose to use or ignore safe area\n- scroll - adds a scroll to your content, if you scroll to top of this scroll - the gesture will continue into popup's drag dismiss.\n\nfloater parameters:     \n- `verticalPadding` - padding which will define padding from the relative vertical edge or will be added to safe area if `useSafeAreaInset` is true   \n- `horizontalPadding` - padding which will define padding from the relative horizontal edge or will be added to safe area if `useSafeAreaInset` is true      \n- `useSafeAreaInset` - whether to include safe area insets in floater padding      \n\nscroll parameters:   \n`headerView` - a view on top which won't be a part of the scroll (if you need one)\n\n`position` - topLeading, top, topTrailing, leading, center, trailing, bottomLeading, bottom, bottomTrailing \n`appearFrom` - `topSlide, bottomSlide, leftSlide, rightSlide, centerScale, none`: determines the direction of appearing animation. If left empty it copies `position` parameter: so appears from .top edge, if `position` is set to .top. `.none` means no animation\n`disappearTo` - same as `appearFrom`, but for disappearing animation. If left empty it copies `appearFrom`.\n`animation` - custom animation for popup sliding onto screen  \n`autohideIn` - time after which popup should disappear    \n`dismissibleIn(Double?, Binding\u003CBool>?)` - only allow dismiss after this time passes (forbids closeOnTap, closeOnTapOutside, and drag). Pass a boolean binding if you'd like to track current status     \n`dragToDismiss` - true by default: enable\u002Fdisable drag to dismiss (upwards for .top popup types, downwards for .bottom and default type)    \n`closeOnTap` - true by default: enable\u002Fdisable closing on tap on popup     \n`closeOnTapOutside` - false by default: enable\u002Fdisable closing on tap on outside of popup     \n`allowTapThroughBG` - Should allow taps to pass \"through\" the popup's background down to views \"below\" it. `.sheet` popup is always allowTapThroughBG = false. False by default    \n`backgroundColor` - Color.clear by default: change background color of outside area     \n`backgroundView` - custom background builder for outside area (if this one is set `backgroundColor` is ignored)    \n`isOpaque` - false by default: if true taps do not pass through popup's background and the popup is displayed on top of navbar. For more see section \"Show over navbar\"     \n`useKeyboardSafeArea` - false by default: if true popup goes up for keyboardHeight when keyboard is displayed\n`dismissCallback` - custom callback to call once the popup is dismissed      \n\n### Draggable card - sheet\nTo implement a sheet (like in 4th gif) enable `dragToDismiss` on bottom toast (see example project for implementation of the card itself)\n```swift\n.popup(isPresented: $show) {\n    \u002F\u002F your content \n} customize: {\n    $0\n        .type (.toast)\n        .position(.bottom)\n        .dragToDismiss(true)\n}\n```\n\n## Examples\n\nTo try the PopupView examples:\n- Clone the repo `https:\u002F\u002Fgithub.com\u002Fexyte\u002FPopupView.git`\n- Open `PopupExample.xcodeproj` in the Xcode\n- Try it!\n\n## Installation\n\n### [Swift Package Manager](https:\u002F\u002Fswift.org\u002Fpackage-manager\u002F)\n\n```swift\ndependencies: [\n    .package(url: \"https:\u002F\u002Fgithub.com\u002Fexyte\u002FPopupView.git\")\n]\n```\n\n## Requirements\n\n* iOS 15.0+ \u002F macOS 11.0+ \u002F tvOS 14.0+ \u002F watchOS 7.0+\n* Xcode 12+ \n\n## Our other open source SwiftUI libraries\n[AnchoredPopup](https:\u002F\u002Fgithub.com\u002Fexyte\u002FAnchoredPopup) - Anchored Popup grows \"out\" of a trigger view (similar to Hero animation)    \n[Grid](https:\u002F\u002Fgithub.com\u002Fexyte\u002FGrid) - The most powerful Grid container    \n[ScalingHeaderScrollView](https:\u002F\u002Fgithub.com\u002Fexyte\u002FScalingHeaderScrollView) - A scroll view with a sticky header which shrinks as you scroll    \n[AnimatedTabBar](https:\u002F\u002Fgithub.com\u002Fexyte\u002FAnimatedTabBar) - A tabbar with a number of preset animations   \n[MediaPicker](https:\u002F\u002Fgithub.com\u002Fexyte\u002Fmediapicker) - Customizable media picker     \n[Chat](https:\u002F\u002Fgithub.com\u002Fexyte\u002Fchat) - Chat UI framework with fully customizable message cells, input view, and a built-in media picker  \n[OpenAI](https:\u002F\u002Fgithub.com\u002Fexyte\u002FOpenAI) Wrapper lib for [OpenAI REST API](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fapi-reference\u002Fintroduction)    \n[AnimatedGradient](https:\u002F\u002Fgithub.com\u002Fexyte\u002FAnimatedGradient) - Animated linear gradient     \n[ConcentricOnboarding](https:\u002F\u002Fgithub.com\u002Fexyte\u002FConcentricOnboarding) - Animated onboarding flow    \n[FloatingButton](https:\u002F\u002Fgithub.com\u002Fexyte\u002FFloatingButton) - Floating button menu    \n[ActivityIndicatorView](https:\u002F\u002Fgithub.com\u002Fexyte\u002FActivityIndicatorView) - A number of animated loading indicators    \n[ProgressIndicatorView](https:\u002F\u002Fgithub.com\u002Fexyte\u002FProgressIndicatorView) - A number of animated progress indicators    \n[FlagAndCountryCode](https:\u002F\u002Fgithub.com\u002Fexyte\u002FFlagAndCountryCode) - Phone codes and flags for every country    \n[SVGView](https:\u002F\u002Fgithub.com\u002Fexyte\u002FSVGView) - SVG parser    \n[LiquidSwipe](https:\u002F\u002Fgithub.com\u002Fexyte\u002FLiquidSwipe) - Liquid navigation animation    \n","PopupView 是一个使用 SwiftUI 编写的弹出视图和提示库。该项目提供了丰富的浮层、吐司通知、弹窗以及底部弹出视图组件，支持自定义样式和动画效果，帮助开发者快速实现美观且功能强大的用户界面。其核心特点包括简洁的 API 设计、高度可定制性以及对最新 SwiftUI 特性的良好兼容性。适用于需要在 iOS 或 macOS 应用中集成各种类型弹出消息或对话框的场景，尤其适合追求现代化 UI 设计与流畅用户体验的应用开发。","2026-06-11 03:09:31","top_language"]