BriefPagingControl is a SwiftUI paging indicator inspired by Instagram. The active dot stays centered, and the surrounding dots shrink and fade as they approach the edges of the carousel window.
You can drag the indicator to change pages (the embedded UIPageControl handles touch and drag), or update the bound page index from anywhere — both stay in sync. Size, color, animation, and accessibility behavior are configurable.
- Three- or five-indicator carousel window
- Smooth multi-page jumps in a single animation
- VoiceOver: announces "Page X of N" and supports swipe-to-change
- Right-to-left layout aware
- Pure-SwiftUI public API, no external dependencies
Supports iOS 15 or later. Swift 5.10+ / Xcode 15+.
- In Xcode, select "File" → "Add Package Dependencies..."
- Enter
https://github.com/tkarlz/BriefPagingControl.git
Or add the dependency directly to Package.swift:
.package(url: "https://github.com/tkarlz/BriefPagingControl.git", .upToNextMajor(from: "1.1.0")),BriefPagingControl(numberOfPages: pages.count, currentPage: $currentPage)BriefPagingControl(numberOfPages: pages.count, currentPage: $currentPage) { config in
config.indicatorSize = 10
config.spacing = 10
config.currentIndicatorColor = .red
config.indicatorColor = .orange
config.numberOfMainIndicators = .five
config.hidesForSinglePage = true
config.animation = .snappy
}indicatorSize = 8
spacing = 8
currentIndicatorColor = .primary
indicatorColor = .gray.opacity(0.6)
numberOfMainIndicators = .three
hidesForSinglePage = false
animation = .default


