v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS
Gallery
Browse an image collection with a native-dialog lightbox.
Interactive preview
Usage
import { Gallery } from "@devvy-ui/react";
<Gallery label="Design studies" images={[{id:'orbit',src:'/examples/orbit.svg',alt:'Orbit study'}]} />API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| images | GalleryImage[] | required | Stable ids, source URLs, alt text and optional captions. |
| label | string | required | Collection name. |
Accessibility & behavior
Platform Behavior & Guidelines
Each image has a named open button. Native lazy images, optional captions and the Lightbox focus-return path are preserved. The caller owns image rights and loading URLs.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add galleryMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Gallery.tsxREACT / TSX
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.