- Docs
- Components
- 3D & Shaders
- Lenticular Carousel
Lenticular Carousel
A gallery whose cards turn over like a lenticular print
Customize
Props
34| Name | Type | Default | Description |
|---|---|---|---|
items | LenticularCarouselItem[] | 8 sample slides | Slides rendered by the carousel |
initialIndex | number | 2 | Slide focused on mount |
cardWidth | number | 260 | Slide width in pixels |
aspectRatio | string | "3 / 4" | Aspect ratio of each slide |
gap | number | 26 | Space between slides in pixels |
borderRadius | number | 14 | Corner radius of the slides in pixels |
strips | number | 56 | Number of lens ribs printed across a slide |
sweep | number | 0.6 | How far the turn lags across the slide, raking the wipe |
refraction | number | 0.32 | Parallax the two faces pick up as the lens turns |
ridge | number | 0.5 | Shading and glint strength of the lens ribs |
foil | number | 0.5 | Strength of the holographic foil on the revealed face |
foilScale | number | 8 | Number of foil shimmer bands across a slide |
scrim | number | 0.85 | Darkening under the label from 0 to 1 |
tilt | number | 14 | Degrees the slide turns while flipped |
travel | number | 0.64 | Fraction of the slide width the cursor sweeps to turn the lens fully |
lift | number | 40 | Distance in pixels the slide travels toward the viewer while flipped |
perspective | number | 1200 | Camera distance in pixels |
inactiveScale | number | 0.9 | Scale applied to slides away from the focus |
inactiveDim | number | 0.55 | Brightness of slides away from the focus from 0 to 1 |
speed | number | 1 | Multiplier for every transition |
trigger | "hover" | "focus" | "hover" | What turns a slide over. Falls back to focus on touch devices |
showLabels | boolean | true | Print the label on the revealed face |
labelColor | string | "#ffffff" | Label colour in hex |
showControls | boolean | true | Show the previous and next buttons |
showDots | boolean | true | Show the segmented progress rail |
loop | boolean | false | Wrap around at either end |
autoplay | boolean | false | Advance on a timer |
autoplayDelay | number | 3200 | Delay between automatic advances in milliseconds |
enableDrag | boolean | true | Allow dragging across the strip to navigate |
enableKeyboard | boolean | true | Allow arrow keys to navigate when focused |
dpr | number | 2 | Upper bound on device pixel ratio |
paused | boolean | false | Hold the foil still |
className | string | - | Additional CSS classes |
onIndexChange | (index: number) => void | - | Fired whenever the focused slide changes |
itemsLenticularCarouselItem[]Slides rendered by the carousel
8 sample slidesinitialIndexnumberSlide focused on mount
2cardWidthnumberSlide width in pixels
260aspectRatiostringAspect ratio of each slide
"3 / 4"gapnumberSpace between slides in pixels
26borderRadiusnumberCorner radius of the slides in pixels
14stripsnumberNumber of lens ribs printed across a slide
56sweepnumberHow far the turn lags across the slide, raking the wipe
0.6refractionnumberParallax the two faces pick up as the lens turns
0.32ridgenumberShading and glint strength of the lens ribs
0.5foilnumberStrength of the holographic foil on the revealed face
0.5foilScalenumberNumber of foil shimmer bands across a slide
8scrimnumberDarkening under the label from 0 to 1
0.85tiltnumberDegrees the slide turns while flipped
14travelnumberFraction of the slide width the cursor sweeps to turn the lens fully
0.64liftnumberDistance in pixels the slide travels toward the viewer while flipped
40perspectivenumberCamera distance in pixels
1200inactiveScalenumberScale applied to slides away from the focus
0.9inactiveDimnumberBrightness of slides away from the focus from 0 to 1
0.55speednumberMultiplier for every transition
1trigger"hover" | "focus"What turns a slide over. Falls back to focus on touch devices
"hover"showLabelsbooleanPrint the label on the revealed face
truelabelColorstringLabel colour in hex
"#ffffff"showControlsbooleanShow the previous and next buttons
trueshowDotsbooleanShow the segmented progress rail
trueloopbooleanWrap around at either end
falseautoplaybooleanAdvance on a timer
falseautoplayDelaynumberDelay between automatic advances in milliseconds
3200enableDragbooleanAllow dragging across the strip to navigate
trueenableKeyboardbooleanAllow arrow keys to navigate when focused
truedprnumberUpper bound on device pixel ratio
2pausedbooleanHold the foil still
falseclassNamestringAdditional CSS classes
-onIndexChange(index: number) => voidFired whenever the focused slide changes
-