{"id":15527092,"url":"https://github.com/shaps80/feedback","last_synced_at":"2025-04-23T12:16:15.125Z","repository":{"id":65696297,"uuid":"597199517","full_name":"shaps80/Feedback","owner":"shaps80","description":"Familiar, easy state-driven haptics, audio and more","archived":false,"fork":false,"pushed_at":"2023-05-05T21:58:01.000Z","size":26,"stargazers_count":23,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T12:15:52.631Z","etag":null,"topics":["haptics","swift","swiftui"],"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/shaps80.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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},"funding":{"github":"shaps80","custom":"paypal.me/shapsuk"}},"created_at":"2023-02-03T21:10:59.000Z","updated_at":"2024-08-19T03:12:02.000Z","dependencies_parsed_at":"2025-03-05T12:42:01.045Z","dependency_job_id":null,"html_url":"https://github.com/shaps80/Feedback","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FFeedback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FFeedback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FFeedback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FFeedback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaps80","download_url":"https://codeload.github.com/shaps80/Feedback/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250430600,"owners_count":21429324,"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":["haptics","swift","swiftui"],"created_at":"2024-10-02T11:04:24.606Z","updated_at":"2025-04-23T12:16:15.097Z","avatar_url":"https://github.com/shaps80.png","language":"Swift","funding_links":["https://github.com/sponsors/shaps80","paypal.me/shapsuk"],"categories":[],"sub_categories":[],"readme":"![ios](https://img.shields.io/badge/iOS-0C62C7)\n[![swift](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fshaps80%2FFeedback%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/shaps80/Feedback)\n\n# Feedback\n\nA SwiftUI library for conveniently adding haptic, audio and other feedback to your view's and state changes.\n\n## Sponsor\n\nBuilding useful libraries like these, takes time away from my family. I build these tools in my spare time because I feel its important to give back to the community. Please consider [Sponsoring](https://github.com/sponsors/shaps80) me as it helps keep me working on useful libraries like these 😬\n\nYou can also give me a follow and a 'thanks' anytime.\n\n[![Twitter](https://img.shields.io/badge/Twitter-@shaps-4AC71B)](http://twitter.com/shaps)\n\n## Features\n\n- Familiar API (follow transition and animation API styles)\n- Haptics\n- Audio\n- Screen flash\n\n## Usage\n\n**Imperative feedback**\n\n```swift\nstruct ContentView: View {\n    var body: some View {\n        Button {\n            withFeedback(\n                .haptic(.selection)\n                .combined(\n                    .audio(.keyboardPress)\n                )\n            ) {\n                // state change\n            }\n        } label: {\n            Text(\"Submit\")\n        }\n    }\n}\n```\n\n**State observation**\n\n```swift\nstruct ContentView: View {\n    @State private var toggle: Bool = false\n    \n    var body: some View {\n        Toggle(\"Toggle\", isOn: $toggle.feedback(.haptic(.selection)))\n    }\n}\n```\n\n## Installation\n\nYou can install manually (by copying the files in the `Sources` directory) or using Swift Package Manager (**preferred**)\n\nTo install using Swift Package Manager, add this to the `dependencies` section of your `Package.swift` file:\n\n`.package(url: \"https://github.com/shaps80/Feedback.git\", .upToNextMinor(from: \"1.0.0\"))`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaps80%2Ffeedback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaps80%2Ffeedback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaps80%2Ffeedback/lists"}