Show shadow for gorhom bottom form in React Native.
P粉148434742
P粉148434742 2023-07-27 23:12:57
0
1
469

I am using the gorhom/react-native-bottom-sheet library. I want to show the shadow box when the user slides up or down the bottom form. How to achieve this? Is it possible? Currently I have it set to show when isOpen, but I want it to show when swiping. I also tried wrapping it in a Touchable component to show the shadow box when isPressed is true, but it didn't work when moving the bottom form.

export default function BottomSheet() { const [isPressed, setIsPressed] = useState(false); const { t } = useTranslation(); const [isOpen, setIsOpen] = useState(false); const bottomSheetModalRef = useRef(null); const snapPoints = ["50%"]; function handlePresentModal() { bottomSheetModalRef.current?.present(); setTimeout(() => { setIsOpen(true); }, 100); } return ( <> 


P粉148434742
P粉148434742

reply all (1)
P粉311089279

Yes, it is possible. You need to use this library to add shadow effect to any component.

Click this link for library

If you need any help, please let me know!

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!