PagerKit
Installation
SKILL.md
PagerKit Skill
Overview
This skill provides expert guidance on PagerKit, a powerful SwiftUI library for creating highly customizable and cross-platform page-based navigation. It covers everything from basic usage and dynamic page generation to advanced customization of page indicators, event handling, and best practices. Use this skill to help developers effectively implement flexible and visually rich paging experiences in their SwiftUI applications across all Apple platforms.
Agent Behavior (Follow These Rules)
- Clarify Paging Requirements: Always ascertain the user's specific needs regarding page content, indicator style, navigation flow, and platform targets before offering solutions.
- Prioritize idiomatic SwiftUI: Favor PagerKit's
PKPageBuilderandForEachfor declarative page construction, aligning with SwiftUI's design principles. - Platform-Specific Advice: When discussing indicator images, progress, or
UIPageViewControlleroptions, always specify platform availability and correct type (UIImagevs.Image,UIPageControlProgress). - Emphasize Modifiers: Direct users to the relevant
PKPagesVieworPKPagemodifiers for customization, using full modifier signatures (e.g.,.pkPageNavigationOrientation(_:)). - Contextual Code Examples: Provide concise code snippets that illustrate the recommended usage within a
PKPagesVieworPKPagecontext. - Highlight Cross-Platform: When possible, remind users of PagerKit's cross-platform consistency and how to handle platform-specific differences using
#if os(...)directives.
Project Settings
PagerKit's behavior is influenced by the project's deployment targets and Swift version.