A SwiftUI scroll view with a sticky header that shrinks and grows as you scroll.
ScalingHeaderScrollView is a SwiftUI library that provides a scroll view with a sticky, scaling header. It solves the problem of creating dynamic, interactive scrolling interfaces where a header smoothly resizes based on scroll position, a common pattern in modern iOS apps. The component handles complex scroll behaviors like header snapping, pull-to-refresh, and load-more out of the box.
iOS developers building SwiftUI applications who need advanced scrolling interfaces with interactive headers, such as those found in social media, news, or content browsing apps.
Developers choose ScalingHeaderScrollView because it encapsulates complex scroll logic into a simple, declarative SwiftUI component, saving significant development time. Its extensive customization options for header behavior and built-in features like pull-to-refresh provide a polished user experience with minimal code.
A scroll view with a sticky header which shrinks as you scroll. Written with SwiftUI.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables smooth scaling and collapsing of headers based on scroll position, replicating modern app interfaces like social media feeds with minimal code, as shown in the GIF examples.
Provides ready-made modifiers for pull-to-refresh and load-more actions, handling async operations and loading indicators automatically without extra setup.
Offers configurable snap points and modes, allowing precise control over header behavior, such as immediate snapping or custom positions between 0 and 1.
Uses familiar @ViewBuilder syntax and modifiers, making it intuitive for SwiftUI developers to integrate and customize, similar to native components.
The README explicitly warns that TabView doesn't work inside ScalingHeaderScrollView due to scrollOffset manipulation issues, limiting its use in apps with tab-based navigation within scrollable content.
Cocoapods integration is deprecated after version 1.1.4, forcing reliance on Swift Package Manager, which may not suit all project setups or legacy systems.
Cannot be used in UIKit projects or mixed environments, making it unsuitable for teams maintaining legacy code or transitioning from UIKit.
For simple scrolling without advanced header effects, the abstraction might add unnecessary complexity compared to native ScrollView, especially with heavy content.