Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
Version History
**PagerKit 1.0.1 Changelog** - Updated code examples to use explicit parameter labels in modifiers (e.g., `.pkCurrentPageIndex(index: $currentPage)`, `.pkPageControlIndicatorPreferredCurrentPageIndicatorImage(image:)`) for improved clarity and alignment with API changes. - Refined quick reference and usage sections to match the latest PagerKit API signatures. - Ensured all sample code and documentation reflect stricter Swift 5.9 syntax requirements. - Corrected several modifier usages and descriptions for accuracy based on recent documentation updates.
What This Skill Does
PagerKit is a SwiftUI library for building page-based navigation across iOS, iPadOS, macOS, tvOS, visionOS, and watchOS. It provides PKPagesView and PKPage components with modifiers for controlling indicators, transitions, and event callbacks. Pages can be defined statically or generated dynamically from data collections.
PagerKit replaces UIPageViewController boilerplate with a declarative SwiftUI API that works consistently across all Apple platforms without platform-specific branching for core paging logic.
When to use it
- Building swipeable onboarding screens in an iOS app
- Adding a vertical story-style reader to a content app
- Creating an auto-advancing photo slideshow with custom dot indicators
- Implementing a multi-step form with programmatic page control
- Tracking swipe direction for analytics in a tutorial walkthrough
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: How do I build a horizontal onboarding flow with custom indicator colors and detect when the user swipes forward?
- 1Wrap onboarding screens in PKPagesView with individual PKPage instances
- 2Apply .pkPageNavigationOrientation(.horizontal) for swipe direction
- 3Bind page state using .pkCurrentPageIndex(index: $currentPage)
- 4Set .pkPageControlIndicatorTintColor(.gray) and .pkPageControlIndicatorCurrentIndicatorTintColor(.blue) for styled dots
- 5Add .pkOnManualPageChange { index, direction in ... } to detect forward swipes
A SwiftUI onboarding view with branded dot indicators that reports swipe direction on each page change