Segmented Image Carousel
An autoplaying editorial image carousel that reconstructs each new frame through a staggered grid of monochrome slices.
Installation#
pnpm dlx shadcn@latest add @davinciui/segmented-image-carouselUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
slidesImage sources, alt text, and optional focal points shown in sequence. | readonly SegmentedImageSlide[] | — |
rowsNumber of horizontal slices in the transition grid. | number | 9 |
columnsNumber of vertical slices in the transition grid. | number | 2 |
intervalMilliseconds between the beginning of consecutive transitions. | number | 1500 |
transitionDurationMilliseconds used by one segmented image handoff. | number | 680 |
autoPlayAutomatically advances after the images are loaded. | boolean | true |
pauseOnHoverOptionally pauses the next transition while the pointer is over the carousel. | boolean | false |
showGridKeeps the faint editorial segment grid visible between transitions. | boolean | true |
ariaLabelAccessible name for the carousel region. | string | "Segmented image carousel" |
classNameControls the carousel dimensions and surrounding surface. | string | — |
Accessibility#
The host is a labelled region with aria-roledescription carousel, while the canvas is aria-hidden and an sr-only text node exposes the active alt. There are no next, previous, or pause controls, so keyboard users cannot manually change slides.
Motion#
The canvas redraws a shuffled grid of slices with smootherStep easing; interval, transitionDuration, rows, and columns control pacing and granularity, and pauseOnHover pauses advancement. Reduced motion is detected via matchMedia, which cancels work and draws a still frame.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

