Components/3D carousel

3D carousel

Arc, CoverFlow and Time Machine paths with color/mono content, controlled current items and timeline scrubbing.

Since 0.6.3BETA

This component doc is in progress

This page is still being migrated. Demos and API details may change.

Overview

TxCarousel3D renders real items and exposes their zero-based current index through v-model. Arc carousel, CoverFlow and Time Machine use independent source transforms. Every path has its own color and monochrome ID. Cards, previous/next controls, indicators and timeline all change the same current item.

Usage

Six source variants and custom content

Loading demo...

The demo shows all six IDs, supports filtering, and includes a real item slot. Its color thumbnails are original inline SVG landscapes. Time Machine has main ticks plus two intermediate ticks per interval; hovering, focusing, clicking or dragging the scrubber selects the nearest item.

VariantPreserved source geometry
card-carousel160px item spacing; hovered/focused offsets rotate 20° and move 24px vertically per step. Active scale 1.05; inactive scale 0.65 expanded, 0.8 collapsed.
card-carousel-monoSame arc path, default slot displays caller-owned text instead of images.
card-cover-flow1000px perspective; 32px spacing, ±38° side rotation, active depth +50px and 50px depth steps behind it. Cards beyond two steps fade out.
card-cover-flow-monoSame CoverFlow path with text surfaces.
card-time-machine800px perspective; depth −60px, vertical −12px and X rotation +2° per future step. Past cards move down 300px, forward 200px, rotate −20°, scale 1.3 and disappear.
card-time-machine-monoSame depth stack and timeline with text surfaces.

The original ThreeDPage's three spatial specimens reuse these actual paths. No generic fan replaces the three geometries.

Best Practices

  • Give every item a stable id, title, and a date when using Time Machine. Supply src and alt only for images you are allowed to display.
  • Set loop only when wrapping is meaningful. The default stops and disables previous/next controls at the ends.
  • Leave expanded undefined for arc hover/focus behavior; set it to a boolean to control the arc pose. CoverFlow and Time Machine do not use this prop.
  • Use timelineHover=false when selection should wait for an explicit click. Keyboard focus still previews the tick geometry without selecting.
  • #item is inside a selection button and should contain non-interactive content. It can override the monochrome default without changing geometry.

API Reference

Props

PropTypeDefaultDescription
itemsMotionCardItem[]requiredCaller-owned cards; empty arrays render #empty.
modelValuenumberinternal 2, Time Machine 0Current zero-based item; clipped to the available items.
variantCarousel3DVariantcard-carouselOne of six IDs; CAROUSEL_3D_VARIANTS exports the list.
expandedbooleanundefinedControlled arc pose; otherwise hover/focus controls it.
loopbooleanfalseWrap previous/next selection.
animatedbooleantrueEnable spatial motion without changing operations.
disabledbooleanfalseDisable card, control, tick and scrubber changes.
controlsbooleantrueShow previous/next controls.
dotsbooleantrueShow accessible item indicators.
timelinebooleantrueShow Time Machine tick controls and range scrubber.
timelineHoverbooleantrueTick hover/focus selects the nearest item.
durationnumber800Shared-spring transition duration in milliseconds.
sizexs / sm / md / lgmdScale card dimensions and spatial paths together.
ariaLabelstringCard carouselRegion accessible name.
previousLabelstringPreviousLocalizable control label.
nextLabelstringNextLocalizable control label.
itemLabelstringItemLocalizable indicator/item fallback name.
timelineLabelstringTimelineLocalizable scrubber and tick accessible name.

MotionCardItem is shared with CardSpread: id?, title?, description?, src?, alt?, date?, href?, color?. Carousel defaults use title/description and, for color IDs, an optional image. No default assets or business records are embedded in the component.

Events

EventArgumentsMeaning
update:modelValueindex: numberCurrent item requested by actual input.
changeitem: MotionCardItem, index: numberChanged caller-owned item; unchanged indices do not emit.

Slots and instance methods

APIContract
#item{ item, index, active }; replaces a card's content.
#caption{ item, index, active: true }; replaces the current caption.
#emptyContent for an empty items array.
previous() / next()Use the same clamping/wrapping and disabled rules as controls.
select(index)Select an item, rounding and clamping/wrapping the requested index.

Arrow keys select adjacent items; Home and End select boundary items. Native buttons support Enter/Space. The range scrubber retains its native keyboard behavior. Current captions are announced politely, and selection does not move focus unexpectedly.

Technologies

Ported from Amicro CardCarousel, CardCoverFlow, CardTimeMachine, cards.ts, card registry entries and the reused ThreeDPage specimens at commit 43c29ce9cdd16459e3eab4992381b8d35b38776a, under MIT, Copyright (c) 2026 SYED SUBHAN UDDIN.

CSS transforms use the shared spring compiler and useMotionActivity. Inactive/reduced motion renders the destination immediately without disabling selection. Time Machine's squircle filter uses a Vue useId identifier, so multiple instances and SSR hydration do not collide. No upstream image assets or React/Motion runtime are included.