A row of narrow image strips where the hovered or focused strip widens to reveal its caption. Click or press Enter to select one.
Selected work
hover a stripnpx shadcn@latest add https://hyperblur.dev/r/image-gallery-expand.jsonWorks in any React project set up with the shadcn CLI. The file lands in components/hyperblur/image-gallery-expand.tsx.
import { ImageGalleryExpand } from "@/components/hyperblur/image-gallery-expand"
<ImageGalleryExpand images={["/a.jpg", "/b.jpg", "/c.jpg"]} captions={["Dawn", "Noon", "Dusk"]} />| Prop | Type | Default | Description |
|---|---|---|---|
| images | string[] | Image URLs. When empty or missing, four built-in gradient and SVG scenes are used. | |
| captions | string[] | Caption per strip. The built-in scenes have their own captions. | |
| alt | string | "Photo" | Base accessible name. Each slide is announced as the alt text followed by its position, for example Photo 2 of 4. |
| width | number | string | "100%" | CSS width of the component. |
| height | number | string | CSS height. When omitted the height follows `aspect`. | |
| aspect | string | "16 / 9" | CSS aspect-ratio used when `height` is not set. |
| index | number | Controlled slide index. Pair with onChange. | |
| defaultIndex | number | 0 | Initial slide index when uncontrolled. |
| onChange | (index: number) => void | Called with the new slide index after every change, including automatic ones. | |
| expand | number | 5 | How many times wider the open strip is than a closed one. |
| gap | number | 6 | Space between strips in pixels. |
| autoPlay | boolean | true | Cycle the open strip until the user picks one. Pauses on hover and focus. |
| interval | number | 2400 | Milliseconds between automatic changes. |
| accent | string | "#2f7bff" | Color of focus rings and highlights. |