CMS Scroll Gallery
Sticky fullscreen scroll gallery — a long scroll track pins one viewport while page scroll drives synchronized background media + centered title transitions, tracked by a draggable glass thumbnail dock.
Installation#
pnpm dlx shadcn@latest add @davinciui/cms-scroll-galleryUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
itemsGallery data. Each item needs title + media (image or video URL), optional mediaType ('auto' | 'image' | 'video') and alt. Works with any item count. | CMSScrollGalleryItem[] | — |
scrollLengthPerItemScroll distance per item in vh. 8 items × 100vh ≈ 800vh journey. | number | 100 |
transitionSmoothingVisual smoothing 0–1 applied on top of native scroll. | number | 0.55 |
transitionStyleScroll-driven transition preset. Zoom Fade matches the reference (opacity + scale 1.2→1). | "zoom-fade" | "fade" | "slide-up" | "slide-down" | "slide-left" | "slide-right" | "blur-fade" | "scale-reveal" | "zoom-fade" |
mediaScaleIncoming media scale for zoom-based presets. | number | 1.2 |
textScaleIncoming title scale, kept in sync with media. | number | 1.2 |
dockPositionFloating thumbnail dock placement preset. | "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "custom" | "center" |
orientationThumbnail rail direction. | "vertical" | "horizontal" | "vertical" |
draggableAllow repositioning the dock via its handle. Dragging never changes gallery progress. | boolean | true |
showThumbnailsToggle the floating thumbnail rail. | boolean | true |
Accessibility#
Thumbnails form a tablist of labeled tabs with aria-selected and aria-current, plus a polite live title. Dragging the dock is pointer-only and its handle is hidden from assistive technology, though each thumbnail stays keyboard focusable.
Motion#
Page scroll drives Framer Motion opacity, scale, slide and blur presets, smoothed by a spring derived from transitionSmoothing. useReducedMotion or the reducedMotion prop removes the transforms, but the opacity crossfade remains.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

