# KptGalleria (kpt-galleria) A large image preview with a thumbnail strip and navigation. Import: `import { KptGalleria } from '@konce-pt/angular';` ## Inputs / model - `items`: KptGalleriaItem[] - { src, thumbnail?, alt? } - `activeIndex`: model (two-way) - `showThumbnails`: boolean (default true) ## Example ## Keyboard Anywhere inside the gallery, `ArrowLeft`/`ArrowRight` move to the neighbouring image (reversed in RTL) and `Home`/`End` to the first/last. When focus is on a thumbnail, it follows the active one. ## Motion and the thumbnail strip Changing the image slides the new one in from the side of travel on a soft spring, while the previous one - a temporary `` under it - drifts back slower and dims (parallax). The kind comes from `enter` in `provideKptMotion`: `spring` (default), `fade` (a short cross-fade) or `none`; with the system "reduce motion" setting it only cross-fades. The first render and a new `items` list at the same index do not animate. The strip has no scrollbar. It scrolls by dragging (mouse and pen; a touch screen scrolls natively), with the wheel or with two small strip arrows that appear only on the side there is more to see - the strip fades out on that edge too (`data-scroll-start` / `data-scroll-end` on `.kpt-galleria__strip`). A move under 5 px is still a click on a thumbnail; after a real drag the click is swallowed and the strip glides on with inertia. The active thumbnail always returns into view, and only as far as needed. The strip arrows are `tabindex="-1"`: from the keyboard the gallery arrows drive the strip. All of it lives in `@konce-pt/motion` (`playGallerySlide`, `attachDragScroll`, `revealThumb`, `trackStripEdges`), shared by both ports. ## Size The stage has a fixed aspect ratio and the image fills it, so the gallery takes the full width of its container and does not jump in height between images. An image with different proportions is cropped (`object-fit: cover`). Two custom properties change it, set on the gallery or any ancestor: - `--kpt-galleria-aspect-ratio` (default `16 / 9`), e.g. `4 / 3` or `1` - `--kpt-galleria-fit` (default `cover`); `contain` shows the whole image with the stage colour around it ## Tokens The stage `--kpt-color-muted`; the active thumbnail `--kpt-color-primary`; the arrows `--kpt-color-surface` (85% via `color-mix`, solid on hover) / `--kpt-color-on-surface` with `--kpt-elevation-2`. ## Accessibility The large image carries its `alt`. Each thumbnail is a button named by the item's `alt` (or `galleria.image` - "Image 3" - when there is none), with `alt=""` on the thumbnail image so the name is not read twice; the active one carries `aria-current`. The arrows use `aria-disabled` at the ends instead of `disabled`, so they keep the focus. A change of image is announced politely through a hidden live region - `galleria.position` ("Image 2 of 4") plus the `alt` - only after the user acts, never on first render.