Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (52 sloc) 1.56 KB

React Fullscreen Lightbox Basic

Fullscreen Lightbox is plugin for displaying images and videos in clean overlaying box.


Dependency Version
react at least 16.8.0
react-dom at least 16.8.0
prop-types at least 15.6.2

Basic usage


 npm install --save-dev fslightbox-react


import React, { useState } from 'react';
import FsLightbox from 'fslightbox-react';

function App() {
    // initial toggler value determines if lightbox should be opened on init
    // if toggler is updated when lightbox is closed it will open it
    // if toggler is updated when lightbox is opened it will close it
    const [toggler, setToggler] = useState(false);

    return (
            <button onClick={ () => setToggler(!toggler) }>
                Toggle Lightbox
                toggler={ toggler }
                sourcesElements={ [
                ] }

export default App;


Available at:

Documentation and props description

Available at:

Browser Compatibility

Browser Works?
Chrome Yes
Firefox Yes
Safari Yes
Edge Yes
IE 11 Yes
You can’t perform that action at this time.