Skip to main content
Version: v2 (Reanimated v1)

Hooks

useBottomSheetModalโ€‹

This hook provides modal functionalities only, for sheet functionalities please look at Bottom Sheet Hooks.

This hook works at any component in BottomSheetModalProvider.

import React from 'react';
import { View, Button } from 'react-native';
import { useBottomSheetModal } from '@gorhom/bottom-sheet';

const SheetContent = () => {
const { dismiss, dismissAll } = useBottomSheetModal();

return (
<View>
<Button onPress={dismiss}>
</View>
)
}

dismissโ€‹

type dismiss = (key: string) => void;

Dismiss a modal by its name/key.

dismissAllโ€‹

type dismissAll = () => void;

Dismiss all mounted/presented modals.