Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 833 Bytes

README.md

File metadata and controls

26 lines (22 loc) · 833 Bytes

CLAnimatedTabView

Reusable SwiftUI View with a top tab bar and animated capsule.
Allows the ability to pass in views of the same type displayed as pages, selectable with top tab bar.

How to add to a project

Able to be added using Swift Package Manager

Example

Simulator.Screen.Recording.-.iPhone.15.-.2024-05-05.at.15.59.36.mp4

Example Implementation

import SwiftUI
import CLAnimatedTabView

struct ContentView: View {
    var body: some View {
        let viewModel = CLAnimatedTabViewModel(tabBarHeight: 69.0, tabNames: ["Tab 1", "Tab 2", "Tab 3"])
        CLAnimatedTabView(viewModel: viewModel) {
            Text("1")
            Text("2")
            Text("3")
        }
    }
}