# ProductGallery

> A product's pictures: a large stage with a rail of thumbnail links on wide screens, and a swipeable strip with dots on a phone.

```ts
import { ProductGallery } from "@sdxc/ui/commerce";
```

Renders the gallery. Wide, the stage sits beside a rail of thumbnail links marked
`aria-current` at the current picture; on a phone, every picture sits in a scroll-snap strip
with a dot per picture, and the rail hides.

## Examples

```tsx
<ProductGallery images={images} current={url.searchParams.get("image") ?? "front"} lightbox="poster-photos" labels={{ zoom: "Zoom", image: "Image {n} of {total}" }} />
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `images` | `Image[]` |  |
| `current` | `string` | The id of the picture on the stage; the first picture when it matches none. |
| `background?` | `string` | The colour behind every picture. |
| `ratio?` | `string` | Every picture's aspect ratio. @default "4 / 5" |
| `lightbox?` | `string` | The id of a root Lightbox dialog the zoom button opens at the current picture. |
| `labels` | `Labels` |  |

Also accepts everything in `Omit<TagProps<"div">, "children">`.

