tjdrhs90

Track ScrollView offset in SwiftUI with a simple modifier

12
0
100% credibility
Found Mar 17, 2026 at 12 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Swift
AI Summary

A SwiftUI package that provides tools to track scroll position in scrolling views, enabling dynamic effects like collapsing headers and parallax animations in iOS apps.

How It Works

1
💭 Dreaming of smooth app scrolls

You're creating an iOS app and want scrolling lists with fun effects, like headers that shrink as users scroll down.

2
🔍 Discover the scroll tracker

You find a simple tool that tracks exactly how far someone has scrolled in a list.

3
Add it to your app

You easily bring this tracker into your app project so it's ready to use.

4
🛠️ Wrap your scrolling list

You place the tracker around your list and set it to update a position value as scrolling happens—everything feels instant and smooth.

5
🎨 Build cool effects

Using the scroll position, you make headers collapse or add parallax motion, watching it respond perfectly to every swipe.

6
👀 Test and tweak

You scroll through your list, seeing the effects come alive exactly as imagined, with no lag or glitches.

Delightful app experience

Your app now has engaging, buttery-smooth scrolling that makes users love swiping through content.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 12 to 12 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is swiftui-scroll-offset?

This Swift package adds dead-simple scroll offset tracking to SwiftUI ScrollViews on iOS 15+. Drop in a wrapper view or modifier like `.trackScrollOffset` to capture CGPoint offsets in real-time, perfect for detecting scroll position in lists, tabviews, or any scrollable content. It solves the common frustration of swiftui get scroll offset or swiftui read scroll offset without native support, enabling scroll-driven UI like collapsing headers or parallax.

Why is it gaining traction?

Its hook is the minimal API—no boilerplate, just pass a closure for offset changes, with options for axes and indicators. Unlike verbose GeometryReader hacks, it delivers clean swiftui scroll content offset reads with zero layout interference or perf hit, via Swift Package Manager. Developers grab it for quick wins on swiftui list scroll offset or swiftui scrollview scroll to offset needs.

Who should use this?

SwiftUI iOS devs building apps with dynamic scroll UIs, like news feeds with sticky headers or fitness trackers syncing scroll to charts. Ideal for indie devs prototyping parallax lists or teams iterating on tabview scroll offset behaviors. Skip if you're on older iOS or need macOS support.

Verdict

Grab it for side projects or proofs-of-concept—solid docs and MIT license make it low-risk, but 12 stars and 1.0% credibility score signal early maturity without tests. Production teams: prototype first, then watch for updates on track scrollview offset swiftui reliability.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.