Phone Stack Carousel

group .........
Sliders and carousels

── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────

A phone in the middle of a row of cards. Drag, scroll or click a card and the row slides on a spring while the phone screen wipes to the next slide through a wobbling circle. Side cards shrink, tuck under each other and darken with distance, and videos play on the phone and on the cards. Device finish, card shape, spring feel, wipe style and background are all props.

── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────

  • * One spring drives everything

    Position eases toward the target index on a damped spring (silk is stiffness 110, damping ratio 1). Card offset, scale, shade, lean and the screen wipe are all read from that one position each frame, so a drag, a wheel flick and a card click land the same way.

  • * The screen wipe is a polygon

    The next slide is clipped to a 60-point polygon that grows from the middle of the screen's right edge. In liquid mode its radius wobbles on two sine waves around the circle, and in iris mode it stays round. The clip-path updates every frame instead of through a CSS transition, so it follows a drag.

  • * Sizes come from the container

    Every length is a multiple of min(1cqh, 1.95cqw), so the phone and cards keep their proportions at any box size. Give the root's parent a height.