{"id":26908687,"url":"https://github.com/space-code/snacker","last_synced_at":"2026-01-26T07:10:57.958Z","repository":{"id":284198944,"uuid":"928283522","full_name":"space-code/snacker","owner":"space-code","description":"snacker is a lightweight Swift library for displaying snackbars in iOS applications.","archived":false,"fork":false,"pushed_at":"2025-03-25T15:43:57.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T16:30:17.971Z","etag":null,"topics":["snackbar","swift","uikit"],"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/space-code.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null}},"created_at":"2025-02-06T11:30:41.000Z","updated_at":"2025-03-25T15:43:58.000Z","dependencies_parsed_at":"2025-03-24T17:58:13.212Z","dependency_job_id":null,"html_url":"https://github.com/space-code/snacker","commit_stats":null,"previous_names":["space-code/snacker"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Fsnacker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Fsnacker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Fsnacker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Fsnacker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/space-code","download_url":"https://codeload.github.com/space-code/snacker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Fsnacker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259145851,"owners_count":22812094,"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":["snackbar","swift","uikit"],"created_at":"2025-04-01T12:17:28.269Z","updated_at":"2026-01-26T07:10:57.952Z","avatar_url":"https://github.com/space-code.png","language":"Swift","readme":"\u003ch1 align=\"center\" style=\"margin-top: 0px;\"\u003esnacker\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/space-code/snacker/blob/main/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/space-code/snacker?style=flat\"\u003e\u003c/a\u003e \n\u003ca href=\"https://swiftpackageindex.com/space-code/snacker\"\u003e\u003cimg alt=\"Swift Compatibility\" src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fsnacker%2Fbadge%3Ftype%3Dswift-versions\"/\u003e\u003c/a\u003e \n\u003ca href=\"https://swiftpackageindex.com/space-code/snacker\"\u003e\u003cimg alt=\"Platform Compatibility\" src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fsnacker%2Fbadge%3Ftype%3Dplatforms\"/\u003e\u003c/a\u003e \n\u003ca href=\"https://github.com/space-code/snacker\"\u003e\u003cimg alt=\"CI\" src=\"https://github.com/space-code/snacker/actions/workflows/ci.yml/badge.svg?branch=main\"\u003e\u003c/a\u003e\n\n## Description\nSnacker is a modern, lightweight Swift framework for displaying customizable snackbars and toast notifications in iOS applications. Designed with simplicity in mind, it allows developers to present any custom view as a non-intrusive notification with flexible positioning and smooth animations.\n\n## Features\n✨ Custom Views — Display any UIView as a snackbar  \n📐 Flexible Positioning — Support for top and bottom screen alignments  \n🎬 Smooth Animations — Fully configurable transition durations  \n🎯 Simple API — Single-line execution via a shared service  \n📱 Modern Swift — Built for Swift 6.0 and iOS 17.0+  \n⚡ Lightweight — Minimal overhead with zero external dependencies  \n🧪 Well Tested — Reliable performance for production environments  \n\n## Table of Contents\n\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Quick Start](h#quick-start)\n* [Usage](#usage)\n* [Custom View Implementation](#custom-view-implementation)\n* [Communication](#communication)\n* [Contributing](#contributing)\n* [Development Setup](#development-setup)\n\n## Requirements\n\n| Platform | Minimum Version |\n| --- | --- |\n| iOS | 17.0+ |\n| Xcode | 16.0+ |\n| Swift | 6.0+ |\n\n## Installation\n\n### Swift Package Manager\n\nAdd the following dependency to your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/space-code/snacker.git\", from: \"1.0.1\")\n]\n\n```\n\nOr add it through Xcode:\n\n1. File \u003e Add Package Dependencies\n2. Enter package URL: `https://github.com/space-code/snacker.git`\n3. Select version requirements\n\n## Quick Start\n\n```swift\nimport Snacker\n\nlet myView = MyCustomView() // Any UIView subclass\n\nSnacker.shared.action(\n    .snack(\n        view: myView,\n        data: SnackbarData(\n            snackbarAlignment: .top(spacing: 20),\n            animationDuration: 0.25\n        )\n    ),\n    container: window\n)\n\n```\n\n## Usage\n\n### Custom View Implementation\n\nYou can display any view as a snackbar. Here is a practical example of creating and presenting a simple information toast:\n\n```swift\nimport UIKit\nimport Snacker\n\n// 1. Define your custom notification view\nfinal class InfoToastView: UIView {\n    private let messageLabel = UILabel()\n\n    init(text: String) {\n        super.init(frame: .zero)\n        backgroundColor = .secondarySystemBackground\n        layer.cornerRadius = 10\n        \n        messageLabel.text = text\n        messageLabel.textAlignment = .center\n        messageLabel.translatesAutoresizingMaskIntoConstraints = false\n        \n        addSubview(messageLabel)\n        NSLayoutConstraint.activate([\n            messageLabel.topAnchor.constraint(equalTo: topAnchor, constant: 12),\n            messageLabel.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -12),\n            messageLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 16),\n            messageLabel.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -16)\n        ])\n    }\n\n    required init?(coder: NSCoder) { fatalError() }\n}\n\n// 2. Present the snackbar\nfunc notifyUser() {\n    let toast = InfoToastView(text: \"New message received!\")\n    \n    let config = SnackbarData(\n        snackbarAlignment: .bottom(spacing: 50),\n        insets: UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20),\n        animationDuration: 0.3\n    )\n    \n    Snacker.shared.action(\n        .snack(view: toast, data: config),\n        container: self.view.window\n    )\n}\n\n```\n\n## Communication\n\n- 🐛 **Found a bug?** [Open an issue](https://github.com/space-code/typhoon/issues/new)\n- 💡 **Have a feature request?** [Open an issue](https://github.com/space-code/typhoon/issues/new)\n- ❓ **Questions?** [Start a discussion](https://github.com/space-code/typhoon/discussions)\n- 🔒 **Security issue?** Email nv3212@gmail.com\n\n## Contributing\n\nWe love contributions! Please feel free to help out with this project. If you see something that could be made better or want a new feature, open up an issue or send a Pull Request.\n\n### Development Setup\n\nBootstrap the development environment:\n\n```bash\nmise install\n```\n\n## Author\n\n**Nikita Vasilev**\n- Email: nv3212@gmail.com\n- GitHub: [@ns-vasilev](https://github.com/ns-vasilev)\n\n## License\n\nSnacker is released under the MIT license. See [LICENSE](https://github.com/space-code/snacker/blob/main/LICENSE) for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**[⬆ back to top](https://www.google.com/search?q=%23snacker)**\n\nMade with ❤️ by [space-code](https://github.com/space-code)\n\n\u003c/div\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-code%2Fsnacker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspace-code%2Fsnacker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-code%2Fsnacker/lists"}