You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well I see this on documentation and I was thinking that it should has a trigger and support to switch the rendering, between blur in and blur out.
And I don't know if this is a bug or it was designed to achieve this, that it will only support fade in, or I use it wrong:
Here is my demo code:
importReact,{useState,useEffect}from'react';importBlurFadefrom'@/components/ui/blur-fade';// Adjust the import path as neededconstBlurFadeDemo=()=>{const[inView,setInView]=useState(false);useEffect(()=>{constintervalId=setInterval(()=>{setInView((prev)=>!prev);},2000);return()=>clearInterval(intervalId);// Cleanup interval on component unmount},[]);return(<divclassName="flex justify-center items-center h-screen"><BlurFadeduration={1}inView={inView}><divclassName="p-10 bg-blue-500 text-white text-center">
This content will blur in and out every 2 seconds.
</div><divclassName="p-10 bg-blue-500 text-white text-center">{`${inView}`}</div></BlurFade></div>);};exportdefaultBlurFadeDemo;
So I think if Blur Fade doesn't support fade out for now, we should remove the fade out part in the document, which can make the readers confused, and I hope we can support this feature; Also if I understand it wrong, please let me know.
The text was updated successfully, but these errors were encountered:
I think I understand it now. Blur Fade will decide if the content should have the animation by the observer, and inView is to force the Blur Fade to think the content is in viewport now. That's why inView cannot be used to trigger the blur out effect.
However I still think to provide a manual way to control the blur in and out would be much better, especially for some async scenarios, like images and videos that can't be confirmed if it is visually rendered when they are actually in view, this can cause to the failure of the blur in and out.
I will keep this issue open for the official reply and I am really looking forward to it. And if the manual idea is okay and needed, I would be happy to contribute.
Well I see this on documentation and I was thinking that it should has a trigger and support to switch the rendering, between blur in and blur out.
And I don't know if this is a bug or it was designed to achieve this, that it will only support fade in, or I use it wrong:
Here is my demo code:
So I think if Blur Fade doesn't support fade out for now, we should remove the fade out part in the document, which can make the readers confused, and I hope we can support this feature; Also if I understand it wrong, please let me know.
The text was updated successfully, but these errors were encountered: