Arcwave Carousel
An infinite CSS-3D carousel whose cards sit on the inside of a cylinder. The centre card faces forward while neighbouring cards curve away, fade, blur, and darken toward the silhouette. Drag, wheel, keyboard, snapping, autoplay, captions, links, and video are built in.
Installation#
pnpm dlx shadcn@latest add @davinciui/arcwave-carouselUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
slidesCards in the ring. Fewer than 20 slides are cloned internally for a seamless loop. | ArcwaveSlide[] | — |
cardSizeModeUse fixed card dimensions or derive the card height from the container. | "fixed" | "fillHeight" | "fixed" |
cardWidthCard width in pixels when cardSizeMode is fixed. | number | 168 |
cardHeightCard height in pixels when cardSizeMode is fixed. | number | 240 |
heightPercentCard height as a percentage of the container in fillHeight mode. | number | 82 |
gapSpace between cards before cylinder scaling. | number | 6.4 |
cornerRadiusCard corner radius in pixels. | number | 0 |
cylinderRadiusOverride the computed cylinder radius. | number | auto |
perspectiveOverride the CSS perspective distance. | number | auto |
maxRotationMaximum card Y rotation in degrees. | number | 65 |
visibleArcVisible portion of the cylinder in degrees. | number | 90 |
sideOpacityOpacity of cards at the edge of the visible arc. | number | 0.45 |
sideBlurBlur in pixels at the edge of the visible arc. | number | 2.4 |
sideDarkenDark overlay strength on side cards. | number | 0 |
edgeFadeWidth of the left and right background fades in percent. | number | 20 |
backgroundStage background color used by the edge fades. | string | "rgb(0, 0, 0)" |
dragEnabledEnable pointer drag and momentum. | boolean | true |
wheelEnabledEnable horizontal and vertical wheel navigation. | boolean | true |
momentumMomentum multiplier applied after a drag. | number | 0.5 |
springStiffnessSpring stiffness used to settle toward the target position. | number | 180 |
springDampingSpring damping used to settle toward the target position. | number | 27 |
snapSnap to the nearest card after interaction. | boolean | false |
autoplayEnable autoplay. Reduced motion disables it. | boolean | true |
autoplayModeContinuous drift or timed steps. | "continuous" | "step" | "continuous" |
autoplayDirectionDirection of autoplay travel. | "left" | "right" | "left" |
autoplaySpeedAutoplay speed in slots per second. | number | 1 |
stepIntervalSeconds between steps in step mode. | number | 3 |
resumeDelaySeconds to wait after interaction before autoplay resumes. | number | 1 |
pauseOnHoverPause autoplay while the pointer is over the carousel. | boolean | false |
captionModeWhen captions are visible. | "hover" | "always" | "center" | "hover" |
revealCaption reveal transition. | "fade" | "slide" | "none" | "slide" |
videoPlaybackWhen video slides play. | "visible" | "centre" | "always" | "visible" |
ariaLabelAccessible label for the carousel region. | string | "Card carousel" |
Accessibility#
The section is a focusable region with aria-roledescription='carousel' and an aria-label (default 'Card carousel'); Left and Right arrows step one slot. Each slide is role='button' with aria-roledescription='slide', labelled from its title and description, and is tabbable only within 75 degrees of centre; off-axis slides drop from the tab order and become aria-hidden once opacity falls below 0.1. Enter or Space centres a side slide, and on the centre slide activates its link; links themselves stay tabIndex -1.
Motion#
One requestAnimationFrame loop eases position toward a target with a stiffness/damping spring; drag release feeds velocity into momentum, optional snap rounds to whole slots after interaction, and continuous or step autoplay advances the target. Per-frame geometry is written straight to element refs, and the loop stops once settled with no autoplay pending. prefers-reduced-motion is watched live: autoplay and spring settling are disabled, and position jumps directly to the target.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

