[BREAKGLASS] Append-only mirror of github.com/bluewallet/react-native-true-sheet
Go to file
Jovanni Lo 65ac47b738
refactor(cpp): use yoga namespace for StyleSizeLength (#260)
* refactor(cpp): use yoga namespace for StyleSizeLength

- Replace yoga::StyleSizeLength with StyleSizeLength via 'using namespace yoga'
- Switch from <yoga/style/StyleSizeLength.h> to <react/renderer/components/view/conversions.h>
- Aligns with patterns used by react-native-safe-area-context

Ref: https://github.com/lodev09/react-native-true-sheet/discussions/218

* chore: run tidy
2025-12-01 22:28:49 +08:00
.github fix(ios): use __typeof instead of typeof in TrueSheetBlurView (#253) 2025-11-29 23:04:38 +08:00
.yarn fix(ios): rename to newPresentingViewController to avoid UIKit collision 2025-11-24 13:54:37 +08:00
.zed Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
android refactor(cpp): use yoga namespace for StyleSizeLength (#260) 2025-12-01 22:28:49 +08:00
common/cpp/react/renderer/components/TrueSheetSpec refactor(cpp): use yoga namespace for StyleSizeLength (#260) 2025-12-01 22:28:49 +08:00
docs feat: iOS blur and grabber improvements (#259) 2025-12-01 21:31:48 +08:00
example feat: iOS blur and grabber improvements (#259) 2025-12-01 21:31:48 +08:00
ios refactor(cpp): use yoga namespace for StyleSizeLength (#260) 2025-12-01 22:28:49 +08:00
scripts chore: change prettier lint to warn 2025-11-30 23:26:04 +08:00
src feat: iOS blur and grabber improvements (#259) 2025-12-01 21:31:48 +08:00
.clang-format Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
.editorconfig chore: initial commit 2024-03-17 05:43:05 +08:00
.gitattributes chore: initial commit 2024-03-17 05:43:05 +08:00
.gitignore Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
.nvmrc Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
.prettierignore chore: update prettier 2025-03-06 05:45:39 +08:00
.watchmanconfig chore: initial commit 2024-03-17 05:43:05 +08:00
.yarnrc.yml Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
AGENTS.md feat: add onWillFocus and onWillBlur events for stacked sheets (#245) 2025-11-29 05:52:30 +08:00
babel.config.js Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
CODE_OF_CONDUCT.md chore: initial commit 2024-03-17 05:43:05 +08:00
CONTRIBUTING.md fix: background improvements (#214) 2025-11-24 17:17:34 +08:00
eslint.config.mjs chore: change prettier lint to warn 2025-11-30 23:26:04 +08:00
jest.setup.js Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
lefthook.yml Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
LICENSE chore: support RN 78 (#160) 2025-03-08 12:31:41 +08:00
package-lock.json chore: release 3.0.0 2025-12-01 07:56:08 +08:00
package.json chore: add release-it hooks 2025-12-01 22:26:40 +08:00
react-native.config.js feat: move Fabric state wrapper to host view (#230) 2025-11-26 03:32:22 +08:00
README.md docs: update README 2025-12-01 08:45:45 +08:00
RNTrueSheet.podspec feat: handle container layout natively via Fabric state (#220) 2025-11-25 10:30:31 +08:00
tsconfig.build.json feat: New Arc support (#106) 2024-12-13 02:32:26 +08:00
tsconfig.json Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
turbo.json fix(ios): use __typeof instead of typeof in TrueSheetBlurView (#253) 2025-11-29 23:04:38 +08:00
yarn.lock docs: add development environment verification section 2025-11-24 14:15:22 +08:00

React Native True Sheet

CI NPM Downloads

Note

🎉 Version 3.0 is here! Completely rebuilt for Fabric with new features like automatic ScrollView detection, native headers/footers, sheet stacking, and more. Read the announcement

The true native bottom sheet experience for your React Native Apps. 💩

React Native True Sheet - IOSReact Native True Sheet - Android

Features

  • Powered by Fabric - Built on React Native's new architecture for maximum performance
  • 🚀 Native - Implemented in the native realm
  • 🎯 Type-safe - Full TypeScript support with Codegen-generated native interfaces
  • Accessible - Native accessibility and screen reader support out of the box
  • 🔄 Flexible API - Use imperative methods or lifecycle events
  • 🪟 Liquid Glass - iOS 26+ Liquid Glass support out of the box. Featured in Expo Blog

Installation

Important

Version 3.0+ requires React Native's New Architecture (Fabric) For the old architecture, use version 2.x. See the Migration Guide for upgrading.

Prerequisites

  • React Native >= 0.76 (Expo SDK 52+)
  • New Architecture enabled (default in RN 0.76+)

Expo

npx expo install @lodev09/react-native-true-sheet

Bare React Native

yarn add @lodev09/react-native-true-sheet
cd ios && pod install

Documentation

Usage

import { TrueSheet } from "@lodev09/react-native-true-sheet"

export const App = () => {
  const sheet = useRef<TrueSheet>(null)

  // Present the sheet ✅
  const present = async () => {
    await sheet.current?.present()
    console.log('horray! sheet has been presented 💩')
  }

  // Dismiss the sheet ✅
  const dismiss = async () => {
    await sheet.current?.dismiss()
    console.log('Bye bye 👋')
  }

  return (
    <View>
      <Button onPress={present} title="Present" />
      <TrueSheet
        ref={sheet}
        detents={['auto', 1]}
      >
        <Button onPress={dismiss} title="Dismiss" />
      </TrueSheet>
    </View>
  )
}

Testing

TrueSheet includes built-in Jest mocks for easy testing. Simply mock the package in your tests:

jest.mock('@lodev09/react-native-true-sheet');

All methods (present, dismiss, resize) are mocked as Jest functions, allowing you to test your components without native dependencies.

Full Testing Guide

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with ❤️ by @lodev09