[BREAKGLASS] Append-only mirror of github.com/bluewallet/react-native-true-sheet
Go to file
2025-12-26 16:32:35 +08:00
.github ci: combine ccache into one step 2025-12-26 01:16:15 +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 feat: add elevation prop for Android and Web (#355) 2025-12-26 00:52:40 +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 docs: improve liquid glass documentation 2025-12-26 16:05:43 +08:00
example ci: maybe improve build-ios workflow 2025-12-26 01:10:06 +08:00
ios fix(ios): support blur intensity with backgroundBlur on iOS 26.1+ 2025-12-26 16:31:28 +08:00
scripts chore: tidy clean script 2025-12-12 04:17:11 +08:00
src feat: add elevation prop for Android and Web (#355) 2025-12-26 00:52:40 +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 refactor: reorganize examples with shared package (#306) 2025-12-12 03:08:20 +08:00
.nvmrc Feat: Fabric (#211) 2025-11-23 14:54:19 +08:00
.prettierignore refactor: export mocks per module (#329) 2025-12-16 15:28:40 +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 refactor(android): replace DialogFragment with CoordinatorLayout (#344) 2025-12-21 16:10:23 +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 docs: update CONTRIBUTING.md for new example reorganization 2025-12-12 03:45:27 +08:00
eslint.config.mjs chore: extend root tsconfig in expo example and fix eslint ignore 2025-12-12 03:35:22 +08:00
jest.setup.js refactor: export mocks per module (#329) 2025-12-16 15:28:40 +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.json chore: release 3.6.2 2025-12-26 16:32:35 +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 chore: fix ci badge 2025-12-16 17:29:44 +08:00
RNTrueSheet.podspec feat: handle container layout natively via Fabric state (#220) 2025-11-25 10:30:31 +08:00
tsconfig.build.json refactor: reorganize examples with shared package (#306) 2025-12-12 03:08:20 +08:00
tsconfig.json refactor: export mocks per module (#329) 2025-12-16 15:28:40 +08:00
turbo.json refactor: reorganize examples with shared package (#306) 2025-12-12 03:08:20 +08:00
yarn.lock fix(expo): use patched react-native-screens for sheet presentation 2025-12-12 04:11:09 +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 - AndroidReact Native True Sheet - Web

Features

  • Powered by Fabric - Built on React Native's new architecture for maximum performance
  • 🚀 Fully Native - Implemented in the native realm, zero JS hacks
  • 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
  • 🐎 Reanimated - First-class support for react-native-reanimated
  • 🧭 React Navigation - Built-in sheet navigator for seamless navigation integration
  • 🌐 Web Support - Full web support out of the box

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 exports mocks for easy testing:

// Main component
jest.mock('@lodev09/react-native-true-sheet', () =>
  require('@lodev09/react-native-true-sheet/mock')
);

// Navigation (if using)
jest.mock('@lodev09/react-native-true-sheet/navigation', () =>
  require('@lodev09/react-native-true-sheet/navigation/mock')
);

// Reanimated (if using)
jest.mock('@lodev09/react-native-true-sheet/reanimated', () =>
  require('@lodev09/react-native-true-sheet/reanimated/mock')
);

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