A customizable SwiftUI component for collecting user effort ratings through an interactive bar-based interface. Inspired by Apple Fitness app's workout rating interface, this component provides a familiar and intuitive way for users to rate their effort levels.
- Interactive bar-based rating system
- 10 levels of effort across 4 intensity categories
- Animated transitions and selections
- Customizable title
- Responsive layout supporting both portrait and landscape orientations
- Callback support for effort selection
struct ContentView: View {
var body: some View {
EffortRatingView(
title: "Rate Your Effort",
onEffortSelected: { intensity, level in
print("Selected \(intensity.rawValue) at level \(level + 1)")
},
onSkip: {
print("Rating skipped")
}
)
}
}title: Customize the view's header textonEffortSelected: Callback providing selected intensity and level (0-9)
This project is available under the MIT license. See the LICENSE file for more info.
- Fork it
- Create your feature branch (
git checkout -b feature/my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature/my-new-feature) - Create a new Pull Request



