Skip to content

jalik/react-lightbox

Repository files navigation

@jalik/react-lightbox

GitHub package.json version GitHub GitHub last commit GitHub issues npm

Quick start

This example allows to open any clicked images in LightBoxWrapper tags.

import { LightBoxProvider, LightBoxWrapper } from '@jalik/react-lightbox';

const images = [
  {alt: 'dogs', src: '/relative/images/dogs.jpg'},
  {alt: 'cats', src: 'http://localhost/images/cats.jpg'},
];

function App() {
  return (
    <LightBoxProvider
      duration={3000}
      loop
    >
      <div>
        <h1>Images</h1>
        <LightBoxWrapper items={images}>
          {images.map((image) => (
            <img src={image.src} alt={image.alt} />
          ))}
        </LightBoxWrapper>
      </div>
    </LightBoxProvider>
  );
}

Changelog

History of releases is in the changelog.

License

The code is released under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published