https://github.com/fluidgroup/compositionkit
A collection of components to build composed component
https://github.com/fluidgroup/compositionkit
uikit
Last synced: 12 months ago
JSON representation
A collection of components to build composed component
- Host: GitHub
- URL: https://github.com/fluidgroup/compositionkit
- Owner: FluidGroup
- License: mit
- Created: 2021-12-12T04:54:41.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-15T05:30:29.000Z (over 1 year ago)
- Last Synced: 2025-07-05T04:13:57.939Z (about 1 year ago)
- Topics: uikit
- Language: Swift
- Homepage: https://FluidGroup.github.io/CompositionKit/documentation/compositionkit/
- Size: 21.4 MB
- Stars: 17
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CompositionKit
A collection of components to build composed component
## Requirements
- Swift 5.5
- iOS 12 +
- [MondrianLayout](https://github.com/muukii/MondrianLayout)
## Components (building blocks)
### AnyView
To create an anonymous view with making content
```swift
func makeSomethingView(onTap: @escaping () -> Void) -> UIView {
let button = UIButton(..., primaryAction: .init { _ in
onTap()
})
return AnyView { view in
VStackBlock {
button
}
}
}
```
## License
MIT