GitHub
Translate

Opens Google Translate in a new tab. Website translation availability varies by region. Details

DOM Interaction • Zero WebGL Contexts

Depth Carousel

Arranges character cutouts or cards on a curved 3D perspective stage with depth scaling, background blur, pointer parallax, drag/click navigation, and a focus zoom mode — sleeping at 0% CPU once settled.

Live Playground

Card 01
Card 02
Card 03
Navigate
Curve 12°

Where to Use It

Anime / Fashion Lookbooks

Combine with spotlight behind the stage to build an interactive character selector with `"Click to Focus"` detail views.

Product & Portfolio Decks

Showcase 3–7 featured products or case studies with zero extra WebGL contexts.

Usage (Copy & Paste)

<div
  id="stage"
  data-fx="depth-carousel"
  data-fx-active-index="1"
  data-fx-spread="26"
  data-fx-parallax="18"
  style="display: grid; place-items: center; height: 70vh;"
>
  <div data-fx-slide style="grid-area: 1 / 1;">Slide 1</div>
  <div data-fx-slide style="grid-area: 1 / 1;">Slide 2</div>
  <div data-fx-slide style="grid-area: 1 / 1;">Slide 3</div>
</div>
<script src="https://unpkg.com/@votax572002/fluxfx/dist/fluxfx.min.js"></script>
'use client';
import { useState } from 'react';
import { DepthCarousel } from '@votax572002/fluxfx/react';

export function Showcase() {
  const [index, setIndex] = useState(1);
  const [focused, setFocused] = useState(false);

  return (
    <DepthCarousel
      activeIndex={index}
      focused={focused}
      onSlideChange={(d) => { setIndex(d.index); setFocused(d.focused); }}
      style={{ display: 'grid', placeItems: 'center', height: '70vh' }}
    >
      <div data-fx-slide style={{ gridArea: '1 / 1' }}>Slide 1</div>
      <div data-fx-slide style={{ gridArea: '1 / 1' }}>Slide 2</div>
      <div data-fx-slide style={{ gridArea: '1 / 1' }}>Slide 3</div>
    </DepthCarousel>
  );
}
import { FluxFX } from '@votax572002/fluxfx';

FluxFX.apply(el, 'depth-carousel', {
  activeIndex: 1,
  focused: false,
  wrap: true,
  clickToFocus: true,
  spread: 25,
  depthScale: 0.22,
  curve: 10,
  parallax: 18,
});

How It Works (Flowchart)

Circular Offset shortestOffset(i, active) Depth + Focus Lerp X, Z, rotateY, blur, scale Pointer Parallax Depth-weighted shift 0% CPU Sleep isIdle() when settled

Props & Attributes

HTML AttributeJS / React PropTypeDefaultDescription
data-fx-active-indexactiveIndexnumber0Index of the centered foreground slide.
data-fx-focusedfocusedbooleanfalseZooms active slide left-center and fades others.
data-fx-wrapwrapbooleantrueWraps seamlessly from last slide to first.
data-fx-click-to-focusclickToFocusbooleantrueToggles focus mode when clicking active slide.
data-fx-spreadspreadnumber25Horizontal spacing (%) per depth step.
data-fx-depth-scaledepthScalenumber0.22Scale drop per step away from center.
data-fx-curvecurvenumber10Y-axis 3D rotation angle per step (degrees).
data-fx-parallaxparallaxboolean | number18Pointer parallax shift in px.