TrueSheet Documentation
website·Indexed 32 days ago
https://sheet.lodev09.comA native bottom sheet experience for React Native apps with full web support. Features include Fabric (New Architecture) support, integration with React Navigation and react-native-reanimated v4, and native keyboard handling. Documentation covers installation for React Native 0.80 and 0.82, migration guides for v3 and v4, and advanced guides for side sheets, stacking, and edge-to-edge display.
What's inside TrueSheet
- This library provides a fully native bottom sheet experience for React Native applications. It is built on the Fabric architecture for high performance and avoids JavaScript-based hacks by implementing logic in the native realm. Key capabilities include native accessibility/screen reader support, built-in keyboard handling with automatic adjustments, and full web support out of the box.
Overview of the Native Bottom Sheet for React Native
This library provides a fully native bottom sheet experience for React Native applications. It is built on the Fabric architecture (React Native's new architecture) to ensure maximum performance and avoids JavaScript-based hacks by implementing logic in the native realm. It supports iOS, Android, and Web out of the box.Requirements for migrating to TrueSheet v3
TrueSheet v3 is built exclusively for React Native's New Architecture (Fabric). The old Paper architecture is no longer supported. To use v3, you must meet the following requirements:
- React Native >= 0.76 (Expo SDK 52+)
- New Architecture enabled (this is the default in React Native 0.76+)
Requirements for TrueSheet v3
TrueSheet v3 is built exclusively for React Native's New Architecture (Fabric). The old Paper architecture is no longer supported. To use v3, you must meet the following requirements:
- React Native >= 0.76 (Expo SDK 52+)
- New Architecture enabled (this is the default in React Native 0.76+)
Key features and integrations of the Bottom Sheet library
The bottom sheet library includes the following technical features and integrations:
- Performance: Powered by Fabric (React Native's new architecture).
- API Flexibility: Supports both imperative methods and lifecycle events.
- Visuals: Includes 'Liquid Glass' support for iOS 26+.
- Animation: First-class support for
react-native-reanimated. - Navigation: Includes a built-in sheet navigator for integration with React Navigation.
- Platform Support: Native iOS, Android, and Web.
Migrate from TrueSheet v2 to v3
Migrating to v3 requires enabling the Fabric (New Architecture) in React Native and updating the package.
Installation:
- Update package:
npm install @lodev09/react-native-true-sheet@^3.0.0 - iOS: Clean
Pods,Podfile.lock, andbuild, then runpod install. - Android: Run
./gradlew cleanin the android folder.
Breaking Code Changes:
- Prop Renames:
sizes$\rightarrow$detentsinitialIndex$\rightarrow$initialDetentIndexinitialIndexAnimated$\rightarrow$initialDetentAnimatedFooterComponent$\rightarrow$footeronPresent$\rightarrow$onDidPresentonDismiss$\rightarrow$onDidDismissonSizeChange$\rightarrow$onDetentChangedimmedIndex$\rightarrow$dimmedDetentIndex
- Removals:
- Remove
edgeToEdge,scrollRef(iOS),contentContainerStyle, andgrabberProps.
- Remove
- Value Changes:
- Detent percentage strings must be fractional numbers (e.g., change
"50%"to0.5).
- Detent percentage strings must be fractional numbers (e.g., change
- Update package:
Understand Liquid Glass visual effects in TrueSheet
Liquid Glass is a translucent, frosted glass appearance with a subtle blur introduced in iOS 26. TrueSheet enables this effect by default on iOS 26+ devices. On iOS 26.1+ devices, the effect is active unlessbackgroundColororbackgroundBlurprops are explicitly set.Migrate TrueSheet props from v2 to v3
Several props have been renamed or removed in v3 to improve clarity and align with the New Architecture. Note thatcontentContainerStyleandedgeToEdgehave been removed entirely.// ❌ v2 <TrueSheet sizes={['auto', '50%', '100%']} initialIndex={1} initialIndexAnimated={false} contentContainerStyle={styles.container} FooterComponent={<MyFooter />} edgeToEdge onPresent={(e) => console.log(e.nativeEvent)} onDismiss={() => console.log('dismissed')} onSizeChange={(e) => console.log(e.nativeEvent)} /> // ✅ v3 <TrueSheet detents={['auto', 0.5, 1]} initialDetentIndex={1} initialDetentAnimated={false} footer={<MyFooter />} onDidPresent={(e) => console.log(e.nativeEvent)} onDidDismiss={() => console.log('dismissed')} onDetentChange={(e) => console.log(e.nativeEvent)} />Handle keyboard visibility in TrueSheet
TrueSheet provides native keyboard avoidance on both iOS and Android. When aTextInputinside the sheet is focused, the sheet automatically adjusts its position to keep the input visible above the keyboard. No additional configuration is required for basic usage.const App = () => { return ( <TrueSheet ref={sheet} detents={['auto']}> <View style={{ padding: 16 }}> <TextInput placeholder="Type something..." style={{ borderWidth: 1, borderColor: '#ccc', padding: 12, borderRadius: 8 }} /> </View> </TrueSheet> ) }Prerequisites for TrueSheet v4
TrueSheet v4 requires synchronous Fabric state updates to resize content in the same frame as the sheet. The following requirements must be met:
- React Native >= 0.82 (Expo SDK 55+)
- New Architecture must be enabled
Prerequisites for installing @lodev09/react-native-true-sheet
To use
@lodev09/react-native-true-sheet, ensure your environment meets the following requirements:- React Native: Version 0.82 or higher.
- Architecture: New Architecture must be enabled (this is the default in React Native 0.76+).
- Xcode: Version 26.1 or higher (required for liquid glass support).
Important Compatibility Note: This package is NOT compatible with Expo Go. You must use Expo CNG (Continuous Native Generation) instead.
Install TrueSheet AI coding skill
You can add a reusable AI capability (skill) to your project to provide your AI coding agent with specific knowledge about TrueSheet patterns and usage, reducing the need for manual explanations.npx skills add lodev09/react-native-true-sheet