BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/loomui/image-trail

Image Trail

loomui/image-trail
FreeComponent

Images dropped along the pointer's path, spaced by distance travelled rather than by time.

Live preview

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

Install it

npx shadcn@latest add https://loomui.design/r/image-trail.json

Source

registry/loomui/image-trail.tsxloomui.design/r/image-trail.json
1"use client"
2
3import * as React from "react"
4
5import { cn } from "@/lib/utils"
6
7export interface ImageTrailProps extends React.ComponentProps<"div"> {
8 /** Sources dropped along the pointer's path, in order and on a loop. */
9 images: string[]
10 /** Pixels the pointer must travel before the next image is dropped. */
11 distance?: number
12 /** Milliseconds an image takes to arrive, hold and fade. */
13 life?: number
14 /** Most images alive at once. Older ones are dropped first. */
15 max?: number
16 /** Largest tilt either side of straight, in degrees. */
17 tilt?: number
18 /** Classes for each dropped image. Size and radius belong here. */
19 imageClassName?: string
20}
21
22interface Drop {
23 id: number
24 x: number
25 y: number
26 src: string
27 tilt: number
28}
29
30/**
31 * Images are dropped by distance travelled rather than on a timer, so a slow
32 * drag leaves the same trail a fast one does and a still pointer leaves none.
33 */
34export function ImageTrail({
35 images,
36 children,
37 className,
38 distance = 90,
39 life = 900,
40 max = 12,
41 tilt = 14,
42 imageClassName,
43 onPointerMove,
44 ...props
45}: ImageTrailProps) {
46 const [drops, setDrops] = React.useState<Drop[]>([])
47 const last = React.useRef<{ x: number; y: number } | null>(null)
48 const nextId = React.useRef(0)
49
50 const handlePointerMove = (event: React.PointerEvent<HTMLDivElement>) => {
51 onPointerMove?.(event)
52
53 if (
54 images.length === 0 ||
55 window.matchMedia("(prefers-reduced-motion: reduce)").matches
56 ) {
57 return
58 }
59
60 const rect = event.currentTarget.getBoundingClientRect()
61 const x = event.clientX - rect.left
62 const y = event.clientY - rect.top
63 const previous = last.current
64
65 if (previous && Math.hypot(x - previous.x, y - previous.y) < distance) {
66 return
67 }
68
69 last.current = { x, y }
70 const id = nextId.current++
71
72 setDrops((current) =>
73 [
74 ...current,
75 {
76 id,
77 x,
78 y,
79 src: images[id % images.length],
80 // Seeded off the id, so a given image in the trail always lands at
81 // the same angle instead of jittering on re-render.
82 tilt: ((id * 37) % (tilt * 2 + 1)) - tilt,
83 },
84 ].slice(-max)
85 )
86 }
87
88 const drop = React.useCallback((id: number) => {
89 setDrops((current) => current.filter((item) => item.id !== id))
90 }, [])
91
92 return (
93 <div
94 data-slot="image-trail"
95 onPointerMove={handlePointerMove}
96 onPointerLeave={() => {
97 last.current = null
98// … truncated

What it pulls in

Other registry items

  • utils

Files it writes

  • registry/loomui/image-trail.tsx

Facts

Registry
loomui
Type
registry:ui
Access
Free
Files written
1
Theme wiring
ships cssVars
Licence
MIT
In the index
at or before 2026-08-20
Last confirmed
yesterday

Go to the source

Docs on loomui loomui.design rjcuff/Loom-UI on GitHub Raw registry item This item as JSON

More from loomui

All 91 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Aurora Backdropaurora-backdroploomuiComponentsFreeno deps
Bento Gridbento-gridloomuiComponentsFreeno deps
Card Stackcard-stackloomuiComponentsFreeno deps
Compare Slidercompare-sliderloomuiComponentsFreeno deps
Confetti Buttonconfetti-buttonloomuiComponentsFreeno deps
Count Upcount-uploomuiComponentsFreeno deps
Credit Cardcredit-cardloomuiComponentsFreeno deps
DrawerdrawerloomuiComponentsFree1 dep

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored on what can be checked

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex