Feedback/DSStepIndicator
DSStepIndicator
feedbackHorizontal progress bar showing current step in a multi-step process.
iOSmacOS
Purpose
Use for onboarding flows, multi-step forms, or wizards. Shows progress and current step name.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| stepsreq | [String] | — | Array of step names |
| currentIndexreq | Binding<Int> | — | Binding to current step index (0-based) |
Examples
Onboarding flow
Show progress through onboarding steps.
swift
@State var currentStep = 0
VStack {
DSStepIndicator(
steps: ["Welcome", "Profile", "Preferences", "Done"],
currentIndex: $currentStep
)
// Step content here
DSButton("Next") {
if currentStep < 3 { currentStep += 1 }
}
}Usage Guidelines
- Use for 3-7 steps; more steps consider alternative UI
- Keep step names short (1-2 words)
- Always show total number of steps
- Animate transitions between steps