Setup the SheetProvider
mainWrap your application (or the relevant part of your component tree) with the SheetProvider component to enable sheet transition state management. This provider manages the shared scale value used for transitions and provides the useSheet hook to child components.
Props
children: The components to be wrapped.resizeType(optional): Determines the resize behavior. Defaults to'decremental'. Supported values are'incremental'or'decremental'.enableForWeb(optional): A boolean to enable sheet transitions on web platforms. Defaults tofalse.
import { SheetProvider } from 'react-native-sheet-transitions';
function App() {
return (
<SheetProvider resizeType="decremental" enableForWeb={true}>
<YourAppContent />
</SheetProvider>
);
}