$ show lodev09/react-native-true-sheet
This is a mature, cross-platform React Native bottom sheet library (`@lodev09/react-native-true-sheet`) that provides native-feeling sheets on iOS (UISheetPresentationController), Android (BottomSheetBehavior + CoordinatorLayout), and Web (forked Vaul drawer). It is built exclusively for React Native's New Architecture (Fabric) with shared C++ shadow nodes for synchronous per-detent layout. The library offers an imperative API via refs and a global static method registry, plus optional integrations with React Navigation (custom stack router and sheet navigator), Expo Router (Sheet layout), and Reanimated (worklet-driven position tracking). Key features include automatic detent sizing, peek detents, header/footer overlays, keyboard avoidance, stacked sheets, dimming, and a portal-based overlay for toasts/dialogs. The codebase demonstrates high craftsmanship with clean native delegates, extensive event handling, and thorough test mocks. It is actively maintained with multiple example apps, CI/CD, Maestro E2E tests, and a documentation site.
The LLM identified 2 files worth highlighting for reuse:
A self-contained React hook that creates a Reanimated worklet handler for tracking position changes of a bottom sheet. It accepts `onPositionChange`, `autoHandle`, and other optional callbacks, and returns a worklet function that can be attached to the sheet's position animated value. This pattern cleanly separates animation logic from component state and is reusable in any Reanimated-driven layout.
A Kotlin delegate class that resolves bottom sheet detent heights (auto, peek, fractional) from configuration and context. It encapsulates the calculation of pixel heights based on detent definitions, content insets, keyboard state, and dynamic content size. The class is fully decoupled from the view hierarchy, making it extractable to any Android bottom sheet implementation that needs flexible, multi-detent support.