### Start Expo Example Packager Source: https://github.com/lodev09/react-native-true-sheet/blob/main/CONTRIBUTING.md Starts the Metro server for the Expo example application. ```sh yarn expo start ``` -------------------------------- ### Start Bare Example Packager Source: https://github.com/lodev09/react-native-true-sheet/blob/main/CONTRIBUTING.md Starts the Metro server for the bare React Native example application. ```sh yarn bare start ``` -------------------------------- ### Install Dependencies Source: https://github.com/lodev09/react-native-true-sheet/blob/main/example/README.md Run this command from the repository root to install all project dependencies. ```bash yarn install ``` -------------------------------- ### Prebuild Expo Example Source: https://github.com/lodev09/react-native-true-sheet/blob/main/CONTRIBUTING.md Before running the Expo example, prebuild the application using this command. ```sh yarn expo prebuild ``` -------------------------------- ### Run Expo Example Source: https://github.com/lodev09/react-native-true-sheet/blob/main/example/README.md Navigate to the Expo example directory and run the iOS or Android application. ```bash cd example/expo # iOS yarn ios # Android yarn android ``` -------------------------------- ### Install React Navigation Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/guides/navigation.mdx Install the core React Navigation library before using the Sheet Navigator. ```bash npm install @react-navigation/native ``` -------------------------------- ### Run Bare React Native Example Source: https://github.com/lodev09/react-native-true-sheet/blob/main/example/README.md Navigate to the bare example directory and run the iOS or Android application. ```bash cd example/bare # iOS yarn ios # Android yarn android ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/README.md Run this command to install all necessary project dependencies using Yarn. ```bash yarn ``` -------------------------------- ### Install with Expo Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/install.mdx Use this command to install the package when working with Expo projects. ```sh npx expo install @lodev09/react-native-true-sheet ``` -------------------------------- ### Run Expo Example on iOS Source: https://github.com/lodev09/react-native-true-sheet/blob/main/CONTRIBUTING.md Builds and runs the Expo example application on an iOS simulator or device. ```sh yarn expo ios ``` -------------------------------- ### Run Bare Example on iOS Source: https://github.com/lodev09/react-native-true-sheet/blob/main/CONTRIBUTING.md Builds and runs the bare React Native example application on an iOS simulator or device. ```sh yarn bare ios ``` -------------------------------- ### Verify Bare Example Environment Source: https://github.com/lodev09/react-native-true-sheet/blob/main/CONTRIBUTING.md Before running the bare React Native example, use this command to check if your development environment is correctly configured. ```sh yarn bare doctor ``` -------------------------------- ### Start Local Development Server Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/README.md Starts a local development server. Changes are reflected live without needing a server restart. Opens the project in your browser. ```bash yarn start ``` -------------------------------- ### Run Bare Example on Android Source: https://github.com/lodev09/react-native-true-sheet/blob/main/CONTRIBUTING.md Builds and runs the bare React Native example application on an Android device or emulator. ```sh yarn bare android ``` -------------------------------- ### Install TrueSheet with Expo Source: https://github.com/lodev09/react-native-true-sheet/blob/main/README.md Use this command to install the TrueSheet package when using Expo. ```sh npx expo install @lodev09/react-native-true-sheet ``` -------------------------------- ### Run Expo Example on Android Source: https://github.com/lodev09/react-native-true-sheet/blob/main/CONTRIBUTING.md Builds and runs the Expo example application on an Android device or emulator. ```sh yarn expo android ``` -------------------------------- ### Install TrueSheet Usage Skill Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/usage.mdx Install the TrueSheet Usage skill into your project using the provided npx command. This skill enhances your AI coding agent's knowledge of the TrueSheet component. ```sh npx skills add lodev09/react-native-true-sheet ``` -------------------------------- ### Install Web Dependencies for TrueSheet Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/guides/web.mdx Install the necessary Radix UI dependencies alongside the TrueSheet library for web support. These are optional peer dependencies. ```sh yarn add @radix-ui/react-dialog @radix-ui/react-presence ``` -------------------------------- ### Install Native Dependencies (iOS) Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/install.mdx After adding the package to a bare React Native project, run this command to install the native iOS dependencies. ```sh cd ios && pod install ``` -------------------------------- ### Setup TrueSheetProvider for Web App Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/guides/web.mdx Wrap your entire application with TrueSheetProvider to enable TrueSheet functionality. This setup is also safe for native platforms. ```tsx import { TrueSheetProvider } from '@lodev09/react-native-true-sheet' const App = () => { return ( ) } ``` -------------------------------- ### Install TrueSheet with Bare React Native Source: https://github.com/lodev09/react-native-true-sheet/blob/main/README.md Use these commands to add the TrueSheet package to a bare React Native project and install native dependencies. ```sh yarn add @lodev09/react-native-true-sheet cd ios && pod install ``` -------------------------------- ### Basic TrueSheet Configuration Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/reference/01-configuration.mdx Example of configuring a TrueSheet with detents, background color, and a ref. Ensure detents are sorted from smallest to largest for recommended behavior. ```tsx ``` -------------------------------- ### Install with Yarn (Bare React Native) Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/install.mdx Use this command to add the package to your project when using Yarn in a bare React Native environment. ```sh yarn add @lodev09/react-native-true-sheet ``` -------------------------------- ### Check Xcode Version Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/troubleshooting.mdx Verify your installed Xcode version to ensure compatibility. The package requires Xcode 26.1 or later for correct background functionality. ```sh xcodebuild -version ``` -------------------------------- ### Add TrueSheet AI Skill Source: https://github.com/lodev09/react-native-true-sheet/blob/main/README.md Install the TrueSheet Usage skill to enable AI coding agents to understand and generate correct TrueSheet code. ```sh npx skills add lodev09/react-native-true-sheet ``` -------------------------------- ### Configure Jest for TrueSheet mocks Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/guides/jest.mdx Configure Jest to use the setup file and transform the package. The `transformIgnorePatterns` config is required because the mock files use ESM syntax, telling Jest to transform the package instead of skipping it. ```json { "jest": { "setupFilesAfterEnv": ["/jest.setup.js"], "transformIgnorePatterns": [ "node_modules/(?!(react-native|@react-native|@lodev09/react-native-true-sheet)/)" ] } } ``` -------------------------------- ### Detent Configurations Source: https://github.com/lodev09/react-native-true-sheet/blob/main/skills/truesheet-usage/SKILL.md Provides examples of different detent configurations for TrueSheet, including 'auto', fractional heights, and combinations. ```tsx // Content-sized sheet // Half and full screen // Three stops: peek, half, full ``` -------------------------------- ### InsetAdjustment Example Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/reference/04-types.mdx Controls how the bottom safe area inset affects detent heights. Use 'never' to maintain precise sizing. ```tsx ``` -------------------------------- ### Handling TrueSheet Lifecycle Events Source: https://github.com/lodev09/react-native-true-sheet/blob/main/docs/versioned_docs/version-3.11.0/reference/02-events.mdx Example of how to use various lifecycle event handlers like onWillPresent, onDidPresent, onDetentChange, onWillDismiss, and onDidDismiss with TrueSheet. ```tsx const App = () => { const handleDismiss = () => { console.log('Bye bye') } const handleOnWillPresent = (e: WillPresentEvent) => { console.log(e.nativeEvent) // { index: 0, position: 123.5, detent: 0.5 } console.log('Sheet is about to be presented') } const handleOnDidPresent = (e: DidPresentEvent) => { console.log(e.nativeEvent) // { index: 0, position: 123.5, detent: 0.5 } } const handleDetentChange = (e: DetentChangeEvent) => { console.log(e.nativeEvent) // { index: 1, position: 234.5, detent: 0.8 } } return (