BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/componentry/scroll-choreography

scroll-choreography

componentry/scroll-choreography
FreeComponent

Component for scroll-choreography

Live preview

live · rendered by the registry
Rendered by componentry on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://componentry.dev/r/scroll-choreography.json

Source

components/ui/scroll-choreography.tsxcomponentry.dev/r/scroll-choreography.json
1"use client";
2
3import { motion, useScroll, useSpring, useTransform } from "framer-motion";
4import { useRef } from "react";
5import { cn } from "@workspace/ui/lib/utils";
6
7interface ScrollChoreographyProps {
8 className?: string;
9 images: {
10 topLeft: string;
11 topRight: string;
12 bottomLeft: string;
13 bottomRight: string;
14 };
15}
16
17export function ScrollChoreography({
18 className,
19 images,
20}: ScrollChoreographyProps) {
21 const containerRef = useRef<HTMLDivElement>(null);
22
23 const { scrollYProgress } = useScroll({
24 target: containerRef,
25 offset: ["start start", "end end"],
26 });
27
28 const smoothProgress = useSpring(scrollYProgress, {
29 stiffness: 400, // Higher stiffness for a slightly faster snap
30 damping: 50, // Play with damping to add a little bounce/jerk
31 mass: 1.2, // Adds a bit more weight to the movement
32 restDelta: 0.001,
33 });
34
35 // Default positions relative to center
36 const xLeft = "-20vw";
37 const xRight = "20vw";
38 const yTop = "-14vh";
39 const yBottom = "14vh";
40
41 // Phase 1: 0 - 0.3 (Diagonal movement)
42 // Phase 2: 0.35 - 0.65 (Stack alignment to center)
43 // Phase 3: 0.7 - 0.9 (Top Right expands to full screen)
44
45 // Top Left -> moves to Bottom Left, then to Center
46 const tlX = useTransform(smoothProgress, [0, 0.3, 0.35, 0.65, 1], [xLeft, xLeft, xLeft, "0vw", "0vw"]);
47 const tlY = useTransform(smoothProgress, [0, 0.3, 0.35, 0.65, 1], [yTop, yBottom, yBottom, "0vh", "0vh"]);
48
49 // Bottom Right -> moves to Top Right, then to Center
50 const brX = useTransform(smoothProgress, [0, 0.3, 0.35, 0.65, 1], [xRight, xRight, xRight, "0vw", "0vw"]);
51 const brY = useTransform(smoothProgress, [0, 0.3, 0.35, 0.65, 1], [yBottom, yTop, yTop, "0vh", "0vh"]);
52
53 // Bottom Left -> stays, then moves to Center
54 const blX = useTransform(smoothProgress, [0, 0.3, 0.35, 0.65, 1], [xLeft, xLeft, xLeft, "0vw", "0vw"]);
55 const blY = useTransform(smoothProgress, [0, 0.3, 0.35, 0.65, 1], [yBottom, yBottom, yBottom, "0vh", "0vh"]);
56
57 // Top Right -> stays, then moves to Center, then expands
58 const trX = useTransform(smoothProgress, [0, 0.3, 0.35, 0.65, 1], [xRight, xRight, xRight, "0vw", "0vw"]);
59 const trY = useTransform(smoothProgress, [0, 0.3, 0.35, 0.65, 1], [yTop, yTop, yTop, "0vh", "0vh"]);
60
61 // Top Right (Hero) scaling/expansion properties
62 const heroWidth = useTransform(smoothProgress, [0.65, 0.7, 0.9, 1], ["36vw", "36vw", "100vw", "100vw"]);
63// … truncated

Facts

Registry
componentry
Type
registry:ui
Access
Free
Files written
0
Licence
MIT
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

Docs on componentry componentry.dev harshjdhv/componentry on GitHub Raw registry item This item as JSON

More from componentry

All 59 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Gradientanimated-gradientcomponentryComponentsFreeno deps
ASCII Effectascii-effectcomponentryComponentsFreeno deps
Aurora Flowaurora-flowcomponentryComponentsFreeno deps
auth-modalauth-modalcomponentryComponentsFreeno deps
border-beamborder-beamcomponentryComponentsFreeno deps
circuit-boardcircuit-boardcomponentryComponentsFreeno deps
closing-plasmaclosing-plasmacomponentryComponentsFreeno deps
collection-surfercollection-surfercomponentryComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex