A package that includes various UI components written in SwiftUI by developers at Conjure. The library will be updated over time to contain more reusable components that can be easily integrated into a project.
- iOS 15.0
- Xcode 14.0
- Swift 5.7
UIComponents is available through Swift Package Manager:
https://github.com/conjure/ios-ui-components.git
Source files are located in the Sources
directory under the name of the corresponding component eg:
./Sources/Carousel
To run the example project, clone the repo, go to the Example
folder, and run the project in Xcode.
CarouselView
provides a simple carousel-style scroll view with pagination where every item is centred in the middle.
Using Carousel is as easy as:
struct MyView: View {
@State var index: Int = 0
let items: [String] = ["Item 1", "Item 2", "Item 3"]
var body: some View {
CarouselView(items: items, currentIndex: $index) { item in
Text(item)
.frame(width: 300, height: 400)
.background(.orange)
.cornerRadius(12)
}
}
}
UIComponents is available under the MIT license.