🎉 New features
- iOS: Added
transitionRefandtransitionOptions(iOS 18+). The sheet zooms out of the view behindtransitionRefwhen it presents and back into it when it dismisses.transitionOptionslines the zoom up with part of the sheet (alignmentRect), or picks a system transition such as'cross-dissolve'. (#1075 by @yasharAyari and @lodev09)
🐛 Bug fixes
- iOS: VoiceOver no longer reaches the screen behind a dimmed sheet that has a
footer. At detents belowdimmedDetentIndex, where that screen still takes touches, VoiceOver now reaches it, footer or not. (#1027 by @rendis and @lodev09) - iOS: Context menus and anything else UIKit shows over a sheet, such as a SwiftUI or
@expo/uiMenu, and the sheet's system grabber are now in the accessibility hierarchy, so XCTest-based tools like Maestro, Detox, and Appium can find them. (#1061, #1062 by @lodev09) - iOS: Content that mounts as a sheet presents or resizes, such as a search field and its results, now appears in place instead of growing in from its top-left corner. (#1051 by @maxlapides and @lodev09)
- iOS:
detentschanged while a sheet presents now apply, instead of the sheet staying at the old detent whileonDidPresentreports the new one. A sheet presented while its presenter, such as aModal, is still opening now waits for it:dismiss()meanwhile cancels it instead of letting it appear, a secondpresent()or sheet no longer hangs, and a changedinitialDetentIndexorinitialDetentAnimated={false}is honored. (#1064 by @lodev09) - iOS: The
softtopScrollEdgeEffectandbottomScrollEdgeEffectnow end just past theheaderandfooter, as under native bars, instead of bleeding about 30pt further into the content. With the keyboard open, a cut-off edge effect no longer shows above an absolutefooterwhen the content ends at its top. (#1066 by @lodev09) - iOS: Sheets with
dimColor,dimOpacityordimBlurno longer crash on iOS 15. On iOS 15, a sheet with onlyauto,peekor detents below0.5is no longer dimmed withdimmed={false}or adimmedDetentIndexabove0, and one that adds a larger detent now dims it fromdimmedDetentIndex. (#1067 by @idlework and @lodev09) - Android:
position, detents and the sheet's max width now matchuseWindowDimensionson React Native 0.86+ below Android 15, andpositionis also correct in split-screen on Android 10 and older. With edge-to-edge off,positionis no longer off by the system bars' size and the bottom of the sheet, including the footer, is no longer cut off. (#1042 by @gadcam and @lodev09) - Android: Scrollable content that overflows the sheet by less than the bottom inset now scrolls, and its end clears the navigation bar instead of sitting under it. (#1048 by @lodev09)
- Android: TalkBack now reaches views shown above a dimmed sheet, and a React Native
Modal's content no longer stays hidden after a dimmed sheet inside it dismisses. A sheet covered by the sheets stacked over it, dimmed or not, is now hidden from TalkBack. The screen behind is reachable as soon as a sheet starts dismissing, and the grabber keeps TalkBack focus and its detent value across prop updates. (#1063 by @lodev09) - Android: A
TextInputin a sheet now starts an autofill session when it is focused, so autofill suggestions and password managers work there. (#1060 by @setoy and @lodev09) - Android: A sheet that grew for the keyboard now returns to its detent when the keyboard hides after scrolling to the focused input. It used to stay at the max detent. (#1074 by @fe-dudu)
- Web:
dismiss()beforeonWillPresentnow cancels aninitialDetentIndexpresent, as on iOS and Android, instead of letting the sheet slide up first. A sheet navigator route that redirects or goes back on its first render no longer flashes its sheet, unless Expo Router loads the route lazily (see Troubleshooting). (#1055 by @lodev09) - Web: With server rendering (e.g. Expo Router's
web.output: 'server'), a sheet presented withinitialDetentIndexis now in the server's HTML, dim included, instead of sliding in once the page hydrates. Form sheets (presentation: 'form') still slide in.TrueSheetOverlayno longer causes a hydration mismatch. (#977 by @simondaigre and @lodev09) - Web: Text in a sheet at a fractional detent (e.g.
0.75) is no longer blurred in Chrome and Safari. (#1072 by @simondaigre and @lodev09) - Web: An
<iframe>in anautoor form sheet no longer loads a second time when the sheet opens or its content changes, so embeds such as Stripe Elements no longer throw "Element didn't mount normally". (#1078 by @1kuko3 and @lodev09) ReanimatedTrueSheetandReanimatedTrueSheetScreenno longer log "findHostInstance_DEPRECATED is deprecated in StrictMode" under React StrictMode. (#1037 by @setoy)ReanimatedTrueSheetandReanimatedTrueSheetScreenno longer trigger Reanimated's "Dependencies should only be used on the web and are always ignored on native" warning on react-native-reanimated 4.6 and later. (#1053 by @setoy)- A sheet navigator route that closes before its sheet presents, such as one that redirects or calls
goBack()on its first render, is now removed without showing the sheet. It used to leave a grabber-height sheet over a dim and stay in the navigation state, swallowing the next back action. (#1050 by @maxlapides and @lodev09) - With the keyboard open, an
autosheet with a scrollable and an absolutefooterno longer leaves a gap as tall as the bottom inset between the content and the footer. The content also keeps its distance from the footer whenfooterOptions.keyboardOffsetis set. A relative footer, or an absolute one withavoidKeyboard: false, no longer leaves empty space above the keyboard while the keyboard covers it. On iOS, the sheet now settles at the correct height when the keyboard opens during presentation. (#1045, #1057, #1065 by @cgrossbyte and @lodev09) - With the keyboard open, a scrollable that ends above or partly under an absolute
footernow scrolls its end above the footer, so a focused input near the end no longer stays hidden behind it. A footer moved byfooterOptions.keyboardOffsetor afooterStylebottomoffset is accounted for, and a footer fully behind the keyboard no longer pushes the focused input higher than needed. (#1058 by @lodev09) - With the keyboard open, an absolute
footernow moves down with a sheet dragged below its first detent, as it does without the keyboard, instead of staying above the keyboard while the sheet slides under it. On Android, the end of a scrollable no longer leaves blank space where the footer was during the drag. (#1071 by @lodev09)
💥 Breaking changes
- Sheet navigator screens with
reanimated: truenow needimport '@lodev09/react-native-true-sheet/navigation/reanimated'once, before the navigator renders (e.g. at the top of the root layout). Without it, they warn in development and runpositionChangeHandleron the JS thread. Apps that don't import it no longer bundlereact-native-reanimatedandreact-native-workletswith the navigator. (#978 by @simondaigre)
💡 Others
- Documented the iOS 26+ floating sheet layout: iPhone sheets float with side and bottom margins below the full detent, and
UIDesignRequiresCompatibilityis the only opt-out. Added to the troubleshooting page, the Liquid Glass guide, and thetruesheet-usageskill. (#1035 by @lodev09) - Documented that keyboard handling on Android needs
adjustResize: withadjustPan, focusing an input low in the sheet can push its top off-screen and leave a gap above the keyboard. Added to the Keyboard guide with a workaround for apps that needadjustPan, the troubleshooting page, and thetruesheet-usageskill. (#1046 by @lodev09) - Added a Transitions guide with a preview, and the
truesheet-usageskill now coverstransitionRefandtransitionOptions. (#1075, #1076 by @lodev09)
New Contributors
- @setoy made their first contribution in #1037
- @cgrossbyte made their first contribution in #1045
- @rendis made their first contribution in #1027
- @fe-dudu made their first contribution in #1074
Full Changelog: v4.1.2...v4.2.0