Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: scroll context #1108

Merged
merged 10 commits into from
Mar 4, 2025
Merged

feat: scroll context #1108

merged 10 commits into from
Mar 4, 2025

Conversation

flochtililoch
Copy link
Collaborator

Every scrollable components - ScrollView, FlatList, SectionList and KeyboardAwareScrollView - now optionally report their scroll position to a shared context. This scroll context can then be used by custom elements.

This PR adds to the demo app a new scroll-opacity element that syncs its opacity with the position of the scroll view. A practical example is added to make the title of a page fade in/out as it leaves/comes back into view.

Implementation details: see commits breakdown.

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-03-04.at.09.39.50.mp4

@flochtililoch flochtililoch merged commit e65f2b6 into master Mar 4, 2025
6 checks passed
@flochtililoch flochtililoch deleted the florent/scroll-context branch March 4, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants