https://github.com/danielsaidi/flipkit
A SwiftUI library with a flip view that works on all major Apple platforms.
https://github.com/danielsaidi/flipkit
ios macos swift swiftui tvos visionos watchos
Last synced: 11 months ago
JSON representation
A SwiftUI library with a flip view that works on all major Apple platforms.
- Host: GitHub
- URL: https://github.com/danielsaidi/flipkit
- Owner: danielsaidi
- License: mit
- Created: 2025-06-02T07:43:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-14T10:22:23.000Z (11 months ago)
- Last Synced: 2025-07-14T11:32:30.946Z (11 months ago)
- Topics: ios, macos, swift, swiftui, tvos, visionos, watchos
- Language: Shell
- Homepage: https://danielsaidi.com/opensource
- Size: 284 KB
- Stars: 30
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# FlipKit
FlipKit is a SwiftUI library with a `FlipView` component that works on all major Apple platforms.
The `FlipView` component can be customized with custom content views, flip durations, flip directions, etc.
## Installation
FlipKit can be installed with the Swift Package Manager:
```
https://github.com/danielsaidi/FlipKit.git
```
## Support My Work
You can [become a sponsor][Sponsors] to help me dedicate more time on my various [open-source tools][OpenSource]. Every contribution, no matter the size, makes a real difference in keeping these tools free and actively developed.
## Getting Started
With FlipKit's `FlipView`, you just have to provide a front and back view:
```swift
import FlipKit
struct MyView: View {
@State private var isFlipped = false
var body: some View {
FlipView(
isFlipped: $isFlipped,
flipDuration: 1.0,
tapDirection: .right,
flipDirections: [.left, .right, .up, .down],
front: { Card(color: .green) },
back: { Card(color: .red) }
)
.flipViewAnimation(.linear, duration: 1.0)
.withListRenderingBugFix() // Use this when in a List
}
}
struct Card: View {
let color: Color
var body: some View {
color.cornerRadius(10)
}
}
```
You can flip the view programatically by just toggling `isFlipped` with code.
## Documentation
The online [documentation][Documentation] has more information, articles, code examples, etc.
## Demo Application
The `Demo` folder has a demo app that lets you explore the library and integrate with a few APIs.
## Contact
Feel free to reach out if you have questions, or want to contribute in any way:
* Website: [danielsaidi.com][Website]
* E-mail: [daniel.saidi@gmail.com][Email]
* Bluesky: [@danielsaidi@bsky.social][Bluesky]
* Mastodon: [@danielsaidi@mastodon.social][Mastodon]
## License
FlipKit is available under the MIT license. See the [LICENSE][License] file for more info.
[Email]: mailto:daniel.saidi@gmail.com
[Website]: https://danielsaidi.com
[GitHub]: https://github.com/danielsaidi
[OpenSource]: https://danielsaidi.com/opensource
[Sponsors]: https://github.com/sponsors/danielsaidi
[Bluesky]: https://bsky.app/profile/danielsaidi.bsky.social
[Mastodon]: https://mastodon.social/@danielsaidi
[Twitter]: https://twitter.com/danielsaidi
[Documentation]: https://danielsaidi.github.io/FlipKit
[Getting-Started]: https://danielsaidi.github.io/FlipKit/documentation/flipkit/getting-started
[License]: https://github.com/danielsaidi/FlipKit/blob/master/LICENSE