Profile Carousel
An editorial team carousel — full portrait cards with one traveling profile detail card, edge-clipped viewport, seamless looping, and drag plus arrow navigation on a single GPU-accelerated track.
Installation#
pnpm dlx shadcn@latest add @davinciui/profile-carouselUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
profilesProfiles shown in the track. Each profile has id, name, image, description, category, optional objectPosition for portrait framing, and optional href. | Profile[] | — |
initialIndexProfile that starts behind the detail card position. | number | 0 |
loopWrap past either end with cloned copies and a seamless invisible reset. | boolean | true |
draggableEnable mouse drag and touch swipe. Dragging past ~22% of a card step changes slides, otherwise it snaps back. | boolean | true |
transitionDurationSlide transition duration in milliseconds. Uses a smooth ease-out curve and collapses to zero when reduced motion is preferred. | number | 600 |
autoplayOpt-in automatic advancement. Pauses on hover, focus, and reduced motion. | boolean | false |
autoplayIntervalDelay between automatic steps in milliseconds. | number | 5000 |
onProfileClickCalled when a card's View Profile control is activated. | (profile: Profile) => void | — |
onIndexChangeCalled with the real profile index when it changes. | (index: number) => void | — |
classNameAdditional CSS classes for the carousel section. | string | — |
Accessibility#
A focusable region with carousel roledescription and the fixed label Team profiles supports Left and Right arrow navigation and labeled previous and next buttons. A polite live region announces Profile X of N, and hover or focus pauses autoplay.
Motion#
The track translates with a cubic-bezier ease over transitionDuration and snaps back below the 22 percent drag threshold, while autoplay steps on autoplayInterval. matchMedia reduced motion sets duration to zero, normalizes loop position instantly, and disables autoplay.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

