SlidingTabView
  • August 19, 2025

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

Installation


Please use Swift Package Manager to install SlidingTabView

Usage


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()
Spacer()
}
.padding(.top, 50)
.animation(.none)
}
}

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

GitHub


View Github

YOU MIGHT ALSO LIKE...
MijickPopups Hero

  Popups Alerts Resizable Sheets Banners

SwiftUI Tooltip

This package provides you with an easy way to show tooltips over any SwiftUI view, since Apple does not provide ...

SimpleToast for SwiftUI

SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or ...

SSToastMessage

Create Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and ...

ToastUI

A simple way to show toast in SwiftUI   Getting Started • Documentation • Change Log