# PagerTabStripView - open source library built in SwiftUI

**URL:** <https://forums.swift.org/t/pagertabstripview-open-source-library-built-in-swiftui/52831>\
**Category:** Community Showcase\
**Tags:** library\
**Created:** [October 14, 2021, 9:32pm UTC](https://forums.swift.org/t/pagertabstripview-open-source-library-built-in-swiftui/52831 "2021-10-14T21:32:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cecipirotto](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/cecipirotto/32/20017_2.png) [@cecipirotto](https://forums.swift.org/u/cecipirotto)\
**Post date:** [October 14, 2021, 9:32pm UTC](https://forums.swift.org/t/pagertabstripview-open-source-library-built-in-swiftui/52831/1 "2021-10-14T21:32:41Z")

</div>

PagerTabStripView is a pager view built in pure SwiftUI. It provides a component to create interactive pager views which contains child views. It allows the user to switch between your views either by swiping or tapping a tab bar item.

> **[GitHub - xmartlabs/PagerTabStripView: 🚀 Elegant Pager View fully written in...](https://github.com/xmartlabs/PagerTabStripView)**
>
> 🚀 Elegant Pager View fully written in pure SwiftUI. - GitHub - xmartlabs/PagerTabStripView: 🚀 Elegant Pager View fully written in pure SwiftUI.

---

<div class="post-metadata">

**Author:** ![young](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/young/32/7878_2.png) [@young](https://forums.swift.org/u/young)\
**Post date:** [October 14, 2021, 10:58pm UTC](https://forums.swift.org/t/pagertabstripview-open-source-library-built-in-swiftui/52831/2 "2021-10-14T22:58:53Z")

</div>

Is there Swift Package Manager SPM?

---

<div class="post-metadata">

**Author:** ![xAlien95](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/xalien95/32/12558_2.png) [@xAlien95](https://forums.swift.org/u/xAlien95)\
**Post date:** [October 14, 2021, 11:12pm UTC](https://forums.swift.org/t/pagertabstripview-open-source-library-built-in-swiftui/52831/3 "2021-10-14T23:12:49Z")

</div>

I guess any repository with a Package.swift in it can be used as a Swift Package, so in this case you can just add

```swift
.package(url: "https://github.com/xmartlabs/PagerTabStripView.git", from: "3.0.0")

```

to your package dependencies.

---

<div class="post-metadata">

**Author:** ![young](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/young/32/7878_2.png) [@young](https://forums.swift.org/u/young)\
**Post date:** [October 15, 2021, 12:08am UTC](https://forums.swift.org/t/pagertabstripview-open-source-library-built-in-swiftui/52831/4 "2021-10-15T00:08:47Z")

</div>

You have `onPageAppear()`, but no `onPageDisappear()`? And why this is not simply `onAppear()` and `onDisappear()`?

How is this different from `TabView` and `.tabViewStyle(.page)`?

Page swipe only work on top of content, swipe on empty area do not work? Should work like TabView

---

<div class="post-metadata">

**Author:** ![cecipirotto](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/cecipirotto/32/20017_2.png) [@cecipirotto](https://forums.swift.org/u/cecipirotto)\
**Post date:** [October 15, 2021, 1:08pm UTC](https://forums.swift.org/t/pagertabstripview-open-source-library-built-in-swiftui/52831/5 "2021-10-15T13:08:51Z")

</div>

Unlike Apple's TabView it provides:

1. Flexible way to fully customize pager tab views. In TabView you can only pass an image and a label. In PagerTabStripView you can set any kind of view.
2. Indicator view indicates the selected child view. You can't get the offset when you scroll using the TabView, for this reason, you can't implement an indicator bar.
3. Each pagerTabItem view can be of different type.
4. Ability to update pagerTabItem according to highlighted, selected, normal state.

Regarding the onPageAppear, we're discussing deprecating it since you can implement it on the user side using onChange of selection.

The swipe works in all your page view. If you want it to cover all the screen you can set the frame. We don't modify yours views.
