{"id":13485403,"url":"https://github.com/SimformSolutionsPvtLtd/SSToastMessage","last_synced_at":"2025-03-27T19:31:04.109Z","repository":{"id":47262657,"uuid":"293710018","full_name":"SimformSolutionsPvtLtd/SSToastMessage","owner":"SimformSolutionsPvtLtd","description":"SSToastMessage is written purely in SwiftUI. It will add toast, alert, and floating message view over the top of any view. It is intended to be simple, lightweight, and easy to use. It will be a popup with a single line of code.","archived":false,"fork":false,"pushed_at":"2024-04-05T05:45:51.000Z","size":10792,"stargazers_count":363,"open_issues_count":8,"forks_count":33,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-04-05T06:28:00.492Z","etag":null,"topics":["cocoapods","custom-dropdown","customizable-toast-messages","floating-toast","in-app-notification-view","librery","messageview","simform","spm","swift5","swiftui","swiftui-alert","swiftui-popup","swiftui-toast","toast"],"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/SimformSolutionsPvtLtd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-09-08T05:27:52.000Z","updated_at":"2024-04-15T15:24:47.254Z","dependencies_parsed_at":"2024-04-05T06:27:49.829Z","dependency_job_id":"a80eb426-8381-4506-847b-0259cfa2f4a2","html_url":"https://github.com/SimformSolutionsPvtLtd/SSToastMessage","commit_stats":{"total_commits":37,"total_committers":2,"mean_commits":18.5,"dds":"0.45945945945945943","last_synced_commit":"6f8c15ae5347655a22651c94ed29a651c172e6ce"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2FSSToastMessage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2FSSToastMessage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2FSSToastMessage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2FSSToastMessage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimformSolutionsPvtLtd","download_url":"https://codeload.github.com/SimformSolutionsPvtLtd/SSToastMessage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245910746,"owners_count":20692497,"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":["cocoapods","custom-dropdown","customizable-toast-messages","floating-toast","in-app-notification-view","librery","messageview","simform","spm","swift5","swiftui","swiftui-alert","swiftui-popup","swiftui-toast","toast"],"created_at":"2024-07-31T18:00:21.716Z","updated_at":"2025-03-27T19:31:03.591Z","avatar_url":"https://github.com/SimformSolutionsPvtLtd.png","language":"Swift","funding_links":[],"categories":["Toast-and-Popup","Samples","UI","iOS","iOS Guides"],"sub_categories":["Content","Toast","SwiftUI"],"readme":"![SSToastMessage Banner](banner.png)\n\nSSToastMessage\n=============\n\n[![CocoaPods Version](https://img.shields.io/cocoapods/v/SSToastMessage.svg)](http://cocoadocs.org/docsets/SSToastMessage)\n[![Platform](https://img.shields.io/cocoapods/p/SSToastMessage.svg?style=flat)](http://cocoapods.org/pods/SSToastMessage)\n[![License](https://img.shields.io/cocoapods/l/SSToastMessage.svg?style=flat)](https://cocoapods.org/pods/SSToastMessage)\n[![swiftUI](https://img.shields.io/badge/-swiftUI-blue)](https://developer.apple.com/documentation/swiftui)\n[![Swift Version][swift-image]][swift-url]\n[![PRs Welcome][PR-image]][PR-url]\n[![Twitter](https://img.shields.io/badge/Twitter-@simform-blue.svg?style=flat)](https://twitter.com/simform)\n\nCreate Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and floating messages to any view on both iPhone and macOS. With SSToastMessage, you can display left and right toast views over any top-level view, making it incredibly versatile and powerful. Designed to be simple, lightweight, and user-friendly, SSToastMessage allows you to show popups with a single line of code. Enhance your app's user experience with seamless and stylish notifications.\n\n## Features\n\n- [x] Customisable toast view\n- [x] Multiple options for show toast view\n- [x] Cross-Platform (iOS \u0026 macOS)\n- [x] Flexible Positioning\n\n\nScreenshots\n---------\n![SSToastMessage Screenshots](screen_shots.png)\n\n\nSetup Instructions\n------------------\n[CocoaPods](http://cocoapods.org)\n------------------\nTo integrate Toast-Swift into your Xcode project using CocoaPods, specify it in your `Podfile`:\n```ruby\npod 'SSToastMessage'\n```\nand in your code add `import SSToastMessage`.\n\n[Swift Package Manager](https://swift.org/package-manager/)\n------------------\nWhen using Xcode 11 or later, you can install `SSToastMessage` by going to your Project settings \u003e `Swift Packages` and add the repository by providing the GitHub URL. Alternatively, you can go to `File` \u003e `Swift Packages` \u003e `Add Package Dependencies...`\n\n         dependencies: [\n             .package(url: \"https://github.com/SimformSolutionsPvtLtd/SSToastMessage.git\", from: \"1.0.0\")\n         ]\n\n## Manually\n\n1. Add `MessageView.swift`, `DispatchWorkHolder.swift`, `ViewModel.swift` and `View+Extension.swift` to your project.\n2. Grab yourself a cold 🍺.\n\n## Requirements\n* iOS 14+\n* macos 13+\n* Xcode 11+\n\n# Usage\n1. Put all your body code into a ZStack, VStack, or HStack. \n2. Add a binding bool to control popup presentation state\n3. Add `.present` modifier to your stack\n4. If you are using NavigationBar or Custom Navigation view then add `.present` modifier to NavigationBar or Custom Navigation view.\n\nBasic Examples\n---------\n```swift\nstruct ContentView: View {\n    @State var showToast = false\n    var body: some View {\n        VStack {\n            // your screen main stack\n            Button(action: {\n                self.showToast.toggle()\n            }) {\n                Text(\"Show Toast\")\n                    .foregroundColor(.black)\n            }\n        }\n        .present(isPresented: self.$showToast, type: .toast, position: .top) {\n           /// create your own view for toast\n            self.createTopToastView()\n        }\n    }\n    \n    func createTopToastView() -\u003e some View {\n        VStack {\n            Spacer(minLength: 20)\n            HStack() {\n                Image(\"mike\")\n                    .resizable()\n                    .aspectRatio(contentMode: ContentMode.fill)\n                    .frame(width: 50, height: 50)\n                    .cornerRadius(25)\n\n                VStack(alignment: .leading, spacing: 2) {\n                    HStack {\n                        Text(\"Mike\")\n                            .foregroundColor(.white)\n                            .fontWeight(.bold)\n                        Spacer()\n                        Text(\"10:10\")\n                            .font(.system(size: 12))\n                            .foregroundColor(Color(red: 0.9, green: 0.9, blue: 0.9))\n                    }\n\n                    Text(\"Hey, Don't miss the WWDC on tonight at 10 AM PST.\")\n                        .lineLimit(2)\n                        .font(.system(size: 14))\n                        .foregroundColor(.white)\n                }\n            }.padding(15)\n        }\n        .frame(height: 110)\n        .background(Color(red: 0.85, green: 0.65, blue: 0.56))\n    }\n}\n```\n\n\u003cbr\u003e \u003c/br\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"demo.gif\" width=\"40%\" height=\"40%\"/\u003e\n\u003c/p\u003e\n\u003cbr\u003e \u003c/br\u003e\n\nWay easy to customize!\n---------\n### Required parameters \n`presented` - binding to determine if the message view should be seen on-screen or hidden     \n`view` - view you want to display on your message view \n\n### Available customizations - optional parameters    \n\nElement | Declaration | Description\n--------|-----------|-----\ntype | `type: MessageType` | set type of view alert, toast and floater, left toast view and right toast view.\nposition | `position: Position` |  top or bottom (for default case it just determines animation direction).\nanimation | `animation: Animation` | custom animation for message view sliding onto screen.\nhorizontalPadding | `horizontalPadding: Double?` | for adding horizontalPadding in toast view.\nduration | `duration: Double?` |  time after which message view should disappear.\ncloseOnTap | `closeOnTap: Bool` | on message view tap it should disappear.\ncloseOnTapOutside | `closeOnTapOutside: Bool` | on outside tap message view should disappear.\nonTap | `onTap: () -\u003e Void` | on message view tap perform any action or navigation.\nonToastHide | `onToastHide: () -\u003e Void` | on toast hide perform any action.\n\n\nSee the demo project for more examples.\n\n## 🤝 How to Contribute\n\nWhether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! :muscle:\n\nCheck out our [**Contributing Guide**](CONTRIBUTING.md) for ideas on contributing.\n\n## Find this example useful? ❤️\n\nGive a ⭐️ if this project helped you!\n\n## Check out our other Libraries\n\n\u003ch3\u003e\u003ca href=\"https://github.com/SimformSolutionsPvtLtd/Awesome-Mobile-Libraries\"\u003e\u003cu\u003e🗂 Simform Solutions Libraries→\u003c/u\u003e\u003c/a\u003e\u003c/h3\u003e\n\n\n## MIT License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n[PR-image]:https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat\n[PR-url]:http://makeapullrequest.com\n[swift-image]:https://img.shields.io/badge/swift-5.0-orange.svg\n[swift-url]: https://swift.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSimformSolutionsPvtLtd%2FSSToastMessage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSimformSolutionsPvtLtd%2FSSToastMessage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSimformSolutionsPvtLtd%2FSSToastMessage/lists"}