crucıble

Chromacast

Palette-thief media carousel: each slide is downsampled to 32×32 and clustered (seeded k-means, k = 3) into its dominant colors, and the whole room behind the card eases to them as a drifting mesh of three blurred blobs. The outgoing card tilts back and slides away while the next one rises; caption and control ink auto-pick black or white by contrast. Arrows, dots, swipe, ←/→/Home/End, autoplay that pauses on hover, focus and offscreen, next/prev/goTo handle, seeded procedural plates. Reduced motion: crossfade with instant recolor.

canvaspro

Installation

CLI

npx shadcn@latest add @crucible/chromacast

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
refReact.Ref<ChromacastHandle>React 19 ref-as-prop → {@link ChromacastHandle}.
itemsChromacastItem[]Slides. Omit for five seeded procedural plates with very different palettes.
autoplaynumber | false5200Autoplay interval in ms, or false. Pauses while hovered, while keyboard focus is inside, offscreen, on hidden tabs and under reduced motion.
indexnumberControlled active slide. Pair with onIndexChange.
defaultIndexnumber0Initial slide when uncontrolled.
onIndexChange(index: number) => voidFires with the requested slide index whenever navigation happens.
intensitynumber0.9Strength of the color-cast backdrop, 0 (plain dark room) – 1 (full cast).
speednumber1Drift speed multiplier for the backdrop blobs. 0 holds them still.
colorDurationnumber1100Duration of the room's color change in ms.
arrowsbooleantrueShow the previous/next arrow buttons.
dotsbooleantrueShow the dot pager.
seednumber11Seed for the procedural plates, palette clustering and blob drift.
pausedbooleanfalseFreeze drift and autoplay. Navigation still works.
Also accepts all props of Omit<React.ComponentPropsWithoutRef<"section">, "children" | "onChange"> — they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, pauses offscreen and on hidden tabs, and passes className through.