You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ios): add scroll edge effect support for iOS 26+ (#595)
* feat(ios): add scroll edge effect support for iOS 26+
Add topScrollEdgeEffect and bottomScrollEdgeEffect to
scrollableOptions for UIScrollEdgeEffect style control.
* docs: update changelog for scroll edge effect
* feat(ios): add scroll edge element container interaction for header/footer
Use UIScrollEdgeElementContainerInteraction on iOS 26+ to apply
automatic blur/gradient edge effects on header and footer views
when content scrolls behind them.
* feat(ios): default scroll edge effect to hidden
Also update docs with scroll edge effect guide and type reference.
* fix(ios): fix hasScrollableOptions check and deduplicate edge interaction cleanup
* refactor(ios): extract edge interaction into UIView category and fix review issues
- Add @available guard for setupEdgeInteractions in setupScrollable
- Make scrollView param nullable in edge interaction methods
- Extract shared edge interaction logic into UIView+ScrollEdgeInteraction
- Remove redundant setupEdgeInteractions calls from mount/scrollViewDidChange
* chore: run tidy
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
7
7
- Add accessibility support to grabber view with VoiceOver/TalkBack actions and state descriptions. ([#587](https://github.com/lodev09/react-native-true-sheet/pull/587) by [@lodev09](https://github.com/lodev09))
8
8
- Add `scrollingExpandsSheet` option to `scrollableOptions`. ([#585](https://github.com/lodev09/react-native-true-sheet/pull/585) by [@lodev09](https://github.com/lodev09))
9
+
-**iOS**: Add `topScrollEdgeEffect` and `bottomScrollEdgeEffect` to `scrollableOptions` for iOS 26+. ([#595](https://github.com/lodev09/react-native-true-sheet/pull/595) by [@lodev09](https://github.com/lodev09))
Copy file name to clipboardExpand all lines: docs/docs/guides/scrolling.mdx
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,38 @@ By default, scrolling content to the top edge expands the sheet to the next dete
80
80
81
81
On iOS, this uses [`prefersScrollingExpandsWhenScrolledToEdge`](https://developer.apple.com/documentation/uikit/uisheetpresentationcontroller/3858107-prefersscrollingexpandswhenscrol). On Android, a custom `BottomSheetBehavior` selectively blocks scroll-driven expansion while preserving normal scrolling, fling deceleration, and grabber-based dragging.
82
82
83
+
## Scroll Edge Effect
84
+
85
+
On iOS 26+, you can apply a blur/gradient edge effect on the header and footer when content scrolls behind them. This uses [`UIScrollEdgeElementContainerInteraction`](https://developer.apple.com/documentation/uikit/uiscrolledgeelementcontainerinteraction) under the hood.
86
+
87
+
Set [`topScrollEdgeEffect`](../reference/types#scrollableoptions) and/or [`bottomScrollEdgeEffect`](../reference/types#scrollableoptions) in [`scrollableOptions`](../reference/configuration#scrollableoptions) to enable it:
88
+
89
+
```tsx
90
+
<TrueSheet
91
+
scrollable
92
+
scrollableOptions={{
93
+
topScrollEdgeEffect: 'automatic',
94
+
bottomScrollEdgeEffect: 'soft',
95
+
}}
96
+
header={<Header />}
97
+
footer={<Footer />}
98
+
>
99
+
<ScrollView>
100
+
<View />
101
+
</ScrollView>
102
+
</TrueSheet>
103
+
```
104
+
105
+
Available values: `'automatic'`, `'hard'`, `'soft'`, or `'hidden'` (default). See [`ScrollEdgeEffect`](../reference/types#scrolledgeeffect).
106
+
107
+
:::info
108
+
This also controls the scroll view's own edge effects ([`UIScrollEdgeEffect`](https://developer.apple.com/documentation/uikit/uiscrolledgeeffect)). `topScrollEdgeEffect` applies to both the header interaction and the scroll view's top edge, and `bottomScrollEdgeEffect` applies to both the footer interaction and the scroll view's bottom edge.
109
+
:::
110
+
111
+
:::note
112
+
This feature requires iOS 26 or later. On older versions, these options are ignored.
113
+
:::
114
+
83
115
## Using `scrollToEnd`
84
116
85
117
When using `scrollable`, the native scroll view frame is modified to fit within the sheet container. This can cause `scrollToEnd()` on `FlatList` or `ScrollView` to not work as expected because React Native's JS-side scroll metrics may not reflect the actual native dimensions.
Copy file name to clipboardExpand all lines: docs/docs/reference/04-types.mdx
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,19 @@ Options for customizing scrollable behavior. Only applies when `scrollable` is `
97
97
| - | - | - | - |
98
98
|`scrollingExpandsSheet`|`boolean`| When `false`, scrolling the content does not expand the sheet to the next detent. Only dragging the grabber or sheet background expands it. Useful for YouTube-style comments sheets. |`true`|
99
99
|`keyboardScrollOffset`|`number`| Additional offset when scrolling to a focused input above the keyboard. |`0`|
100
+
|`topScrollEdgeEffect`|[`ScrollEdgeEffect`](#scrolledgeeffect)| The scroll edge effect applied to the top edge of the scroll view and header. iOS 26+ only. |`'hidden'`|
101
+
|`bottomScrollEdgeEffect`|[`ScrollEdgeEffect`](#scrolledgeeffect)| The scroll edge effect applied to the bottom edge of the scroll view and footer. iOS 26+ only. |`'hidden'`|
102
+
103
+
## `ScrollEdgeEffect`
104
+
105
+
Controls the blur/gradient edge effect on the scroll view edges and header/footer overlay views. iOS 26+ only.
106
+
107
+
| Value | Description |
108
+
| - | - |
109
+
|`'automatic'`| System default edge effect style. |
110
+
|`'hard'`| A hard, opaque edge effect. |
111
+
|`'soft'`| A soft, gradient edge effect. |
112
+
|`'hidden'`| No edge effect. This is the default. |
0 commit comments