Gallerykit
Lightbox

Getting Started with @gallerykit/lightbox

1. Install

pnpm add @gallerykit/lightbox

If your app does not yet depend on @gallerykit/core, the package will pull it in automatically.

2. Use it

import { Lightbox, useLightbox } from "@gallerykit/lightbox";

export function ItemRow({ items }: { items: GalleryItem[] }) {
  const lb = useLightbox(items);
  return (
    <>
      {items.map((item, i) => (
        <button key={item.id} onClick={() => lb.open(i)}>
          <img src={item.src} alt={item.alt} />
        </button>
      ))}
      <Lightbox {...lb} />
    </>
  );
}

Next steps

  • Read the API reference for the full list of exports.
  • Browse the rest of the GalleryKit docs to see which layouts, skins, and themes are available.