Fslightbox

  • FSlightbox is easy to use, but powerful plugin for displaying various types of sources in beautiful overlying box with tons of features such as captions, thumbnails, zooming and more! For more details
  • Installation
    npm i fslightbox-react
    Script
    import FsLightbox from 'fslightbox-react'
    import img1 from '../../assets/images/img1.jpeg'
    
    const Fslightbox = () => {
        const [imageController, setImageController] = useState({
            toggler: false,
            slide: 1
        });
        
        function imageOnSlide(number) {
            setImageController({
            toggler: !imageController.toggler,
            slide: number
            }); 
        }
        return (
                <Link onClick={() => imageOnSlide(1)} to="#">
                    <Image src={img1} className="img-fluid bg-soft-info rounded" alt="profile-image" />
                </Link>
            )
        }