Carousel

The carousel component allows a series of content to cycle horizontally.

Backpack/Carousel

Cocoapods class reference view on Github

Default

Day Night

Usage

Example of a Carousel:


                                                
                                                @State var currentIndex: Int = 0
                                                
                                                func image(_ name: String) -> Image {
                                                    Image(name)
                                                        .resizable()
                                                        .aspectRatio(contentMode: .fill)
                                                }
                                                
                                                BPKCarousel(
                                                    images: [image("Paris"), image("Barcelona"), image("London")],
                                                    currentIndex: $currentIndex
                                                )