SwiftUI package with 30 custom page controls behind one compact API:
import SUIPageControls
import SwiftUI
struct Example: View {
@State private var page = 0
var body: some View {
PageControl(
currentPage: $page,
pageCount: 5,
style: .worm
)
}
}The package is SwiftUI-native, has no external dependencies, and keeps the same core model as UIPageControl: a current page binding plus a total page count. Each indicator is tappable when allowsInteraction is enabled, and the root control supports VoiceOver adjustable actions.
In Xcode, choose File > Add Package Dependencies... and enter:
https://github.com/Georgy-hook/SUIPageControls.git
Or add it from another package:
.package(url: "https://github.com/Georgy-hook/SUIPageControls.git", branch: "main")Supported platforms: iOS 17+, macOS 14+, tvOS 17+, watchOS 10+. iOS 26 Liquid Glass APIs are used where available by .glassCapsules and .background = .glass; older supported OS versions fall back to material styling.
PageControl(
currentPage: $page,
pageCount: pages.count,
style: .expandingCapsule,
configuration: PageControlConfiguration(
indicatorSize: 10,
spacing: 9,
activeColor: .blue,
inactiveColor: .gray.opacity(0.3),
secondaryActiveColor: .cyan,
trackColor: .gray.opacity(0.15),
lineWidth: 2,
maxVisibleIndicators: 7,
orientation: .horizontal,
hidesForSinglePage: true,
allowsInteraction: true,
background: .none
)
)Useful shortcuts:
PageControl(currentPage: $page, pageCount: 8, style: .glassCapsules, configuration: .glass)
PageControl(currentPage: $page, pageCount: 20, style: .slidingWindow)
PageControl(currentPage: $page, pageCount: 6, style: .fractionLabel)Generate the full visual set with:
make snapshotsThe command renders every PageControlStyle into Screenshots and verifies that exactly 30 PNG files were created. On macOS 26+, it captures glassCapsules from a live window so the gallery contains the real Liquid Glass effect; macOS may request Screen Recording permission.
| Style | Look |
|---|---|
classicDots |
Compact UIPageControl-like row of small circles with a filled current page. |
scaledDots |
The current circle grows while inactive dots stay smaller. |
fadingDots |
Dots fade by distance from the current page. |
slidingWindow |
A limited moving dot window for larger page counts. |
instagramDots |
Centered active dot with edge dots shrinking and fading near the window boundary. |
expandingCapsule |
Active page stretches into a pill while inactive pages remain dots. |
worm |
A rounded worm slides over the rail and stretches toward the next position. |
thinWorm |
Slim underline-like worm for dense interfaces. |
snake |
Longer active pill crawls over a quiet dotted track. |
filledPill |
Every page is a small pill; the current pill fills and widens. |
jumpingDots |
The selected dot hops upward. |
droppingDots |
The selected dot drops with a soft shadow. |
swapDots |
The current tile flips while inactive tiles stay flat. |
exchangeDots |
Neighboring dots subtly trade vertical positions around the active page. |
colorBlend |
Each page has a rotating accent color; the active color is emphasized. |
chameleon |
Hollow inactive marks become solid active dots with a stronger accent. |
hollowRings |
Ring indicators with a filled center only for the current page. |
ringPulse |
Current page has an outer pulse ring. |
orbit |
A small satellite marker orbits the active page dot. |
diamonds |
Rotated square indicators for a sharper look. |
roundedSquares |
Soft square indicators with a larger active tile. |
lineBars |
Short bars where the selected page becomes taller. |
equalizer |
Bar heights fall off by distance from the current page. |
segmentedProgress |
Discrete progress capsules with completed/current states. |
continuousProgress |
A single progress track filled by current page. |
steppedProgress |
Numbered steps connected by a subtle progress rail. |
underline |
Visible page numbers with a compact underline under the current page. |
fractionLabel |
Text fraction paired with a mini progress bar. |
numberedDots |
Active dot reveals the current page number. |
glassCapsules |
Capsule indicators tuned for iOS 26 Liquid Glass with material fallback. |
Implementation is original SwiftUI code. Ideas and behavior were reviewed from:
- Apple HIG Page controls: https://developer.apple.com/design/human-interface-guidelines/page-controls
- Apple UIPageControl docs: https://developer.apple.com/documentation/uikit/uipagecontrol
- Apple PageTabViewStyle docs: https://developer.apple.com/documentation/swiftui/pagetabviewstyle
- Apple Liquid Glass docs: https://developer.apple.com/documentation/technologyoverviews/adopting-liquid-glass
- ChiliLabs/CHIPageControl: https://github.com/ChiliLabs/CHIPageControl
- mohn93/AdvancedPageControl: https://github.com/mohn93/AdvancedPageControl
- popwarsweet/PageControls: https://github.com/popwarsweet/PageControls
- EmilioPelaez/ScrollingPageControl: https://github.com/EmilioPelaez/ScrollingPageControl
- shima11/FlexiblePageControl: https://github.com/shima11/FlexiblePageControl
- Coder-TanJX/JXPageControl: https://github.com/Coder-TanJX/JXPageControl
- Interactive-Studio/ISPageControl: https://github.com/Interactive-Studio/ISPageControl
- tbxark/TKRubberIndicator: https://github.com/tbxark/TKRubberIndicator
- HanlunWang/DotPageIndicator: https://github.com/HanlunWang/DotPageIndicator
- tkarlz/BriefPagingControl: https://github.com/tkarlz/BriefPagingControl
- advantagefse/AnimatedPageControl-SwiftUI: https://github.com/advantagefse/AnimatedPageControl-SwiftUI
- honcheng/iOS-StyledPageControl: https://github.com/honcheng/iOS-StyledPageControl
- nicklockwood/FXPageControl: https://github.com/nicklockwood/FXPageControl
- notsobigcompany/BigUIPaging: https://github.com/notsobigcompany/BigUIPaging
Created by Georgy GLuhov. Distributed under the MIT License.





























