Interactions
WebGL galleryFree

Guided Gallery

A WebGL image gallery with focal-aware crops, tactile browsing, and captions that follow each image.

Full-page view

Live preview

Interact with the effect here. Drag, hover, and use its controls.

Blue hour, 1 of 12

Variation Tweaking

Adjust the options and see the preview update live.

Lens preset
Entrance
0.48
18
12
1.5

Installation

Install automatically via CLI or manually integrate dependencies and code.

$npx @istmx/ui add guided-gallery

Usage

Import the component and configure visual variants, sizes, and operational states.

import { GuidedGallery } from '@/components/interactions/guided-gallery'
 
<GuidedGallery
items={items}
preset="liquid"
interval={1.5}
captions
/>

Composition

Compose with icons, form triggers, and layout containers.

const items = [
{
src: '/gallery/portrait.jpg',
alt: 'Portrait in soft window light',
title: 'Soft light',
note: 'A short note about the image.',
focalPoint: { x: 0.5, y: 0.4 },
},
]
 
<GuidedGallery items={items} autoplay />

API Reference

Property matrix, types, defaults, and usage descriptions.

PropTypeDefaultDescription
itemsGuidedGalleryItem[]built-in galleryImages with alt text, optional aspect, focal point, title, subtitle, and note.
preset
'liquid''ribbon''vortex''arch'
'liquid'Selects the lens and card deformation preset.
intro
'rise''bloom''spin''deal''fade''none'
'rise'Sets the gallery entrance animation.
cardHeightnumber0.5Card height as a fraction of the gallery height.
gapnumber12Space between cards in pixels.
radiusnumber0Card corner radius in pixels.
fit
'natural''portrait''square''landscape'
'natural'Chooses a standard image crop ratio.
lensWidthnumberpreset valueOverrides the lens width.
lensHeightnumberpreset valueOverrides the lens height.
tiltnumberpreset valueOverrides the card tilt.
roundnessnumberpreset valueOverrides the lens roundness.
bendnumberpreset valueOverrides the card bend amount.
reachnumberpreset valueOverrides the bend reach.
curl
'twist''rise''fall'
preset valueSets the direction of the card curl.
dispersionnumberpreset valueControls chromatic dispersion around the lens.
liquidnumberpreset valueControls liquid lens strength.
followCursorbooleanpreset valueMakes the lens follow the pointer.
squeezenumber0.2Controls card squeeze during movement.
focusOnClickbooleantrueExpands the selected card for closer inspection.
autoplaybooleanfalseEnables continuous automatic browsing.
intervalnumber1.5Time in seconds for each autoplay slide.
captionsbooleantrueShows the active title, subtitle, note, and count.
captureWheelbooleantrueUses the mouse wheel to navigate the gallery.
onChange(index, item) => voidundefinedRuns when the active image changes.
onSelect(index, item) => voidundefinedRuns when the active image is selected.
classNamestring''Adds classes to the gallery container.
styleCSSPropertiesundefinedAdds inline styles to the gallery container.
aria-labelstring'Guided image gallery'Accessible name for the gallery region.

Data Attributes

State-reflecting DOM attributes for custom selector styling.

This component does not expose custom data attributes. Standard HTML data attributes are forwarded to its interactive element.

How It Works

OGL renders each image into a WebGL scene. A focal-point-aware crop keeps each subject in view while cards translate across the canvas. Pointer input, wheel input, keyboard navigation, and the play control all share the same carousel engine.

Accessibility

The gallery is a named carousel region with keyboard controls, descriptive image text, visible focus styling, and reduced-motion support.

Keyboard Navigation
Arrow Left / RightMove between slides.
Enter / SpaceSelect the active image.
EscapeClose the expanded image.
TabReach playback and carousel controls.

Limitations

•WebGL 2 is required for the shader preview; image content remains available through the component fallback.
•Provide valid image alt text and normalized focal-point coordinates for best results.

Features

•Focal-aware image crops.
•Linear continuous autoplay with a configurable interval.
•Drag, wheel, and keyboard navigation.
•Morphing titles, notes, and slide counts.
•Liquid, ribbon, vortex, and arch visual presets.
Credits

Meet the team behind the interaction

Created and crafted with inspiration from React Bits.

Aryan

Aryan

@istmX

Building high-performance interfaces, developer tooling, and autonomous agent workflows.

Helped by
Ella

Ella

UI/UX Designer

Crafting beautiful experiences.

Kenji

Kenji

WebGL & Shader Designer

Bringing visuals to life.

Sarah

Sarah

Motion Designer

Animating the details.