StepperView
SwiftUI iOS component for Step Indications.
Install / Use
/learn @badrinathvm/StepperViewREADME
StepperView
SwiftUI iOS component for Step Indications
<br/> <p align="center"> <img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/structure.png" alt="StepperView"/> </p> <br/> <p align="center"> <img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/StepperViewLineLifeCycle.png" alt="StepperViewLineLifeCycle"/> </p>Table of Contents
- Features
- AI-Powered StepperView Generator
- Documentation
- Installation
- Requirements
- Usecase
- Usage
- View Modifiers
- Custom Step Indicators
- Mentions
- Contribution
- License
Features
- Support for Vertical and Horizontal Alignments.
- iOS and WatchOS capabilities
- Support for Circle, Image, Custom View, Animated Step Indicators
- Customizable line,spacing & animation options.
- Pitstop feature to add intermediate stages between Step Indicators
- Support for updating the life cycle status for each of the steps
- NEW: AI-Powered StepperView Generator using Apple's on-device Foundation Models (iOS 26+)
AI-Powered StepperView Generator
Generate fully configured StepperViews from natural language prompts using Apple's on-device Foundation Models framework. Describe what you want in plain English, and the AI generates a complete StepperView with indicators, colors, pit stops, and lifecycle states — all rendered live with copyable Swift code.
<!-- TODO: Replace with actual gif --> <p align="center"> <img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/ai_stepper_generator.gif" width="300" alt="AI StepperView Generator"/> </p>Highlights
- Describe your stepper in natural language (e.g., "Create a delivery tracking stepper with 5 stops")
- Supports vertical and horizontal modes
- Choose from numbered circles, plain circles, or SF Symbol indicators
- Use named colors or any hex color (e.g.,
#FF6B35) - Optionally add pit stops with descriptions
- Live preview and copyable Swift code in a tabbed interface
- Fully on-device — no network calls, powered by Apple Foundation Models
Quick Start
import StepperView
// Add to your SwiftUI view (iOS 26+ only)
if #available(iOS 26.0, *) {
StepperViewAIGeneratorView()
}
Example Prompts
| Prompt | What it generates | |--------|-------------------| | "Create a 5-step checkout flow" | Vertical stepper with numbered circles | | "Build a horizontal flight booking stepper with sfSymbol indicators" | Horizontal stepper with SF Symbol icons | | "Make a recipe stepper in #E11D48 with details" | Vertical stepper with hex color and pit stops | | "Create a 4-step onboarding flow in purple" | Vertical stepper with AI-chosen purple hex color |
Configuration
All AI generation behavior is configurable via ai_config.yaml — UI strings, default values, valid colors, SF Symbols allowlist, pit stop keywords, and the system prompt template can all be customized without touching Swift code.
Documentation
Installation
To run the example project, clone the repo, and run pod install from the Example directory first.
CocoaPods
StepperView is available through CocoaPods. To install it, simply add the following line to your Podfile.
pod 'StepperView','~> 2.0'
Carthage
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate StepperView into your Xcode project using Carthage, specify it in your Cartfile:
github "badrinathvm/stepperView" == 2.0
Swift Package Manager
StepperView is available through Swift Package Manager.
In Xcode:
- Go to
File>Add Package Dependencies... - Enter the repository URL:
https://github.com/badrinathvm/StepperView.git - Select version
2.0or later
In Package.swift:
dependencies: [
.package(url: "https://github.com/badrinathvm/StepperView.git", from: "2.0.0")
]
Requirements
- iOS 13.0+ (AI features require iOS 26.0+)
- watchOS 7.0+
- macOS 10.15+
- Xcode 16+
- Swift 5.9+
Usecase
<table> <tr> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/example1.png" width="250" alt="example1" align="center"/></td> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/example2.png" width="250" alt="example2" align="center"/></td> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/example3.png" width="250" alt="example2" align="center"/></td> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/Indicator_Animation.gif" width="250" alt="example2" align="center"/></td> </tr> </table> <table> <tr> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/lifecycle1.png" alt="lifecycle1" align="center"/></td> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/lifecycle2.png" alt="lifecycle2" align="center"/></td> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/lifecycle3.png" alt="lifecycle3" align="center"/></td> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/lifecycle4.png" alt="lifecycle3" align="center"/></td> </tr> </table>iPhone
<table> <tr> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/stepperView_with_usecases.gif" width="250" alt="StepperView" align="left"/> </td> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/stepperView_pitStops.gif" width="250" alt="StepperViewWithPitStops" align = "center"/> </td> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/stepperView_multiple_options.gif" width="250" alt="StepperViewWithMultipleOptions" align = "center"/> </td> </tr> </table>Apple Watch Support
<table> <tr> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/Watch_StepperView_1.png" width="250" alt="Watch_StepperView_Vertical" align="center"/></td> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/Watch_StepperView_2.png" width="250" alt="Watch_StepperView_Icon" align="center"/></td> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/Watch_StepperView_3.png" width="250" alt="Watch_StepperView_Horizontal" align="center"/></td> <td><img src="https://raw.githubusercontent.com/badrinathvm/StepperView/master/images/Watch_StepperView_4.png" width="250" alt="Watch_StepperView_Pitstop" align="center"/></td> </tr> </table>View Modifiers
.addSteps(_ steps: [View]) :
1. list of views to be closer to the indicator
.alignments(_ alignments: [StepperAlignment])
1. optional modifier
2. defaults to .center, available with custom options either .top, .center, .bottom
.indicatorTypes(_ indicators:[StepperIndicationType]):
1. modifier to customize the step indications
2. provides enum with cases .circle(color, width), .image(Image, width), .custom(AnyView), .animation(AnyView)
.lineOptions(_ options: StepperLineOptions):
1. line customization `color` , `width` , `corner radius`
2. Has the option of `defaults`, `custom` , `rounded`
.spacing(_ value: CGFloat):
1. spacing between each of the step views either vertically or horizontally
.autoSpacing(_ value: Bool):
1. if set to `true` - Dynamically calculates the spacing between each of the steps.
.stepIndicatorMode(_ mode: StepperMode):
1. Step Indicator display modes either vertical or horizontal
.loadingAnimationTime(_ time: Double):
1. controls the speed of the animation for step Indicator
.stepLifeCycles(_ lifecycle: [StepLifeCycle]):
1. Can set the life cycle status for each of the steps as `completed`, `pending`
.addPitStops(_ steps: [View]):
1. optional modifier
2. list of views which will be displayed below the step text
.pitStopLineOptions(
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
