Skip to content
SwiftUI - Sliding Tab View
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.swiftpm/xcode add path to package.swift Jul 5, 2019
Sources/SlidingTabView beta 5 compatibility fixes Aug 3, 2019
Tests init Jul 5, 2019
.gitignore Initial Commit Jul 5, 2019
Package.swift add path to package.swift Jul 5, 2019 Fix width of image in the README file Jul 5, 2019

SlidingTabView is a simple Android-Like tab view that is built using the latest and greatest SwiftUI. Almost everything is customizable!


Please use Swift Package Manager to install SlidingTabView


Just instantiate and bind it to your state. That is it!

@State private var selectedTabIndex = 0
SlidingTabView(selection: $selectedTabIndex,tabs: ["First Tab", "Second Tab"]

Canvas Preview

struct SlidingTabConsumerView : View {
    @State private var selectedTabIndex = 0

    var body: some View {
        VStack(alignment: .leading) {
            SlidingTabView(selection: self.$selectedTabIndex, tabs: ["First", "Second"])
            (selectedTabIndex == 0 ? Text("First View") : Text("Second View")).padding()
            .padding(.top, 50)

@available(iOS 13.0.0, *)
struct SlidingTabView_Previews : PreviewProvider {
    static var previews: some View {

Suggestions or feedback?

Feel free to create a pull request!

You can’t perform that action at this time.