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
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)
Props & Attributes
| HTML Attribute | JS / React Prop | Type | Default | Description |
|---|---|---|---|---|
data-fx-active-index | activeIndex | number | 0 | Index of the centered foreground slide. |
data-fx-focused | focused | boolean | false | Zooms active slide left-center and fades others. |
data-fx-wrap | wrap | boolean | true | Wraps seamlessly from last slide to first. |
data-fx-click-to-focus | clickToFocus | boolean | true | Toggles focus mode when clicking active slide. |
data-fx-spread | spread | number | 25 | Horizontal spacing (%) per depth step. |
data-fx-depth-scale | depthScale | number | 0.22 | Scale drop per step away from center. |
data-fx-curve | curve | number | 10 | Y-axis 3D rotation angle per step (degrees). |
data-fx-parallax | parallax | boolean | number | 18 | Pointer parallax shift in px. |