- YOU MUST NOT do builds unless you are told to.
- YOU MUST NOT commit changes yourself until I explicitly tell you to.
- YOU MUST NOT create summary documents unless you are told to.
- YOU MUST NOT add code comments that are obvious.
React Native Fabric (New Architecture) bottom sheet library for iOS and Android.
- Fabric - No bridge, direct C++ communication
- Codegen - Auto-generates native interfaces from TypeScript specs
- C++ Shared Code - State and shadow nodes shared between platforms
src/
βββ fabric/ # Native component specs (codegen input)
βββ specs/ # TurboModule spec
βββ reanimated/ # Reanimated integration
βββ navigation/ # React Navigation integration
βββ mocks/ # Testing mocks
βββ __tests__/ # Unit tests
βββ TrueSheet.tsx # Main React component
βββ *.web.tsx # Web implementations
ios/
βββ TrueSheetView.mm # Host view (Fabric component)
βββ TrueSheetViewController.mm # Sheet presentation controller
βββ TrueSheetModule.mm # TurboModule
βββ TrueSheet*View.mm # Container/Content/Header/Footer views
βββ core/ # BlurView, DetentCalculator, GrabberView
βββ events/ # Drag, Focus, Lifecycle, State events
βββ utils/ # Blur, Gesture, Layout, Window utilities
android/.../truesheet/
βββ TrueSheetView.kt # Host view
βββ TrueSheetViewController.kt # BottomSheet controller
βββ TrueSheetModule.kt # TurboModule
βββ TrueSheet*View.kt # Container/Content/Header/Footer views
βββ TrueSheet*ViewManager.kt # View managers
βββ core/ # BottomSheetView, CoordinatorLayout, etc.
βββ events/ # Drag, Focus, Lifecycle, State events
βββ utils/ # Keyboard, Screen utilities
common/cpp/.../TrueSheetSpec/ # Shared C++ state and shadow nodes
Both platforms: TrueSheetView (hidden host) β Controller β ContainerView β Header/Content/Footer
- iOS: Uses
UISheetPresentationControllerfor native sheet behavior - Android: Uses
CoordinatorLayout+BottomSheetBehaviorwith aDimViewbehind the sheet
- Add to
src/fabric/TrueSheetViewNativeComponent.ts - Build the app (runs codegen)
- Implement in
TrueSheetView.mm(iOS) andTrueSheetViewManager.kt(Android)
- Add
DirectEventHandlerto native component spec - Create event class in
ios/events/andandroid/.../events/ - Emit from native view
When creating a PR, use the template from .github/PULL_REQUEST_TEMPLATE.md.
After creating a PR, always update CHANGELOG.md. Do this immediately after creating the PR, before moving on to other tasks.
Add entry to Unreleased section in CHANGELOG.md for user-facing changes:
π New features- New functionalityπ Bug fixes- Bug fixesπ‘ Others- Refactors, internal changes
Format: - **Platform**: Description. ([#123](https://github.com/lodev09/react-native-true-sheet/pull/123) by [@username](https://github.com/username))
Sort entries by platform: iOS first, then Android, then Web, then cross-platform or unscoped entries last.