https://github.com/reactcomponentkit/listkitexamples
Examples for ListKit
https://github.com/reactcomponentkit/listkitexamples
Last synced: 7 months ago
JSON representation
Examples for ListKit
- Host: GitHub
- URL: https://github.com/reactcomponentkit/listkitexamples
- Owner: ReactComponentKit
- License: mit
- Created: 2021-09-16T14:52:41.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-21T15:09:08.000Z (about 4 years ago)
- Last Synced: 2025-02-14T19:53:53.597Z (9 months ago)
- Language: Swift
- Size: 7.88 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ListKitExamples
Examples for ListKit
You can checkout examples for ListKit at here:
- [https://github.com/ReactComponentKit/ListKitExamples](https://github.com/ReactComponentKit/ListKitExamples)
||||||
|:----------------------------:|:------------------------:|:------------------------:|:----------------------:|:----------------------:|:----------------------:|

```swift
renderer.render(of: Array(0..<10)) { index in
Section(id: index) {
HGroup(width: .fractionalWidth(1.0), height: .absolute(150)) {
for _ in 0..<3 {
ColorBox2Component(color: randomColor, width: .fractionalWidth(0.5), height: .fractionalHeight(1.0))
VGroup(of: [0, 1], width: .fractionalWidth(0.25), height: .fractionalHeight(1.0)) { _ in
ColorBox2Component(color: randomColor, width: .fractionalWidth(1.0), height: .fractionalHeight(0.5))
}
VGroup(of: [0, 1], width: .fractionalWidth(0.25), height: .fractionalHeight(1.0)) { _ in
ColorBox2Component(color: randomColor, width: .fractionalWidth(1.0), height: .fractionalHeight(0.5))
}
}
}
}
.orthogonalScrollingBehavior(.groupPaging)
.boundarySupplementaryItem(SectionHeaderComponent(title: "Section \(index + 1)"))
}
```