BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/terrae/animated-footprint

Map Animated Footprint

terrae/animated-footprint
FreeComponent

Animated footprint steps that walk along a path on the map.

Install it

npx shadcn@latest add https://www.terrae.dev/animated-footprint.json

Source

src/registry/map/animated-footprint.tsxwww.terrae.dev/animated-footprint.json · first 6 KB
1"use client"
2
3import { useEffect, useMemo, useRef, useState } from "react"
4import { createPortal } from "react-dom"
5import type mapboxgl from "mapbox-gl"
6import { Footprints } from "lucide-react"
7import { mapgl } from "./map-library"
8import { useMap } from "./hooks"
9import type { MapPath, MapCoordinates } from "./types"
10
11type FootprintStep = {
12 coordinates: MapCoordinates
13 bearing: number
14 isLeft: boolean
15}
16
17type MarkerEntry = {
18 marker: mapboxgl.Marker
19 element: HTMLDivElement
20}
21
22type FootprintControl = {
23 start: () => void
24 reset: () => void
25 isActive: boolean
26}
27
28type FootprintProps = {
29 entry: MarkerEntry
30 step: FootprintStep
31 color: string
32 size: number
33 className?: string
34}
35
36type MapAnimatedFootprintProps = {
37 path: MapPath
38 id?: string
39 color?: string
40 size?: number
41 stepSpacing?: number
42 staggerDelay?: number
43 duration?: number
44 autoStart?: boolean
45 loop?: boolean
46 className?: string
47}
48
49const footprintControls = new Map<string, FootprintControl>()
50
51const DEFAULT_COLOR = "#000000"
52const DEFAULT_SIZE = 20
53const DEFAULT_STEP_SPACING = 48
54const DEFAULT_STAGGER_DELAY = 200
55const DEFAULT_DURATION = 400
56const METERS_PER_DEGREE_LATITUDE = 111320
57const LATERAL_OFFSET = 0.4
58
59const approximateDistance = (from: MapCoordinates, to: MapCoordinates) => {
60 const latitudeRadians = (from[1] * Math.PI) / 180
61 const deltaX = (to[0] - from[0]) * Math.cos(latitudeRadians) * METERS_PER_DEGREE_LATITUDE
62 const deltaY = (to[1] - from[1]) * METERS_PER_DEGREE_LATITUDE
63
64 return Math.sqrt(deltaX ** 2 + deltaY ** 2)
65}
66
67const approximateBearing = (from: MapCoordinates, to: MapCoordinates) => {
68 const latitudeRadians = (from[1] * Math.PI) / 180
69 const deltaX = (to[0] - from[0]) * Math.cos(latitudeRadians)
70 const deltaY = to[1] - from[1]
71
72 return ((Math.atan2(deltaX, deltaY) * 180) / Math.PI + 360) % 360
73}
74
75const interpolateCoordinate = (from: MapCoordinates, to: MapCoordinates, fraction: number): MapCoordinates => {
76 return [from[0] + (to[0] - from[0]) * fraction, from[1] + (to[1] - from[1]) * fraction]
77}
78
79const generateSteps = (path: MapPath, stepSpacing: number): FootprintStep[] => {
80 if (path.length < 2) {
81 return []
82 }
83
84 const steps: FootprintStep[] = []
85 let distanceAccumulated = 0
86 let stepIndex = 0
87
88 for (let segmentIndex = 0; segmentIndex < path.length - 1; segmentIndex++) {
89 const fromCoordinate = path[segmentIndex]
90 const toCoordinate = path[segmentIndex + 1]
91// … truncated

What it pulls in

npm packages

  • mapbox-gl
  • lucide-react

Other registry items

  • https://www.terrae.dev/map.json

Files it writes

  • src/registry/map/animated-footprint.tsx

Facts

Registry
terrae
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-10
Last confirmed
today

Go to the source

www.terrae.dev alamenai/terrae on GitHub Raw registry item This item as JSON

More from terrae

All 40 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Map Animated Circleanimated-circleterraeComponentsFree1 dep
Map Animated Polygonanimated-polygonterraeComponentsFree1 dep
Map Animated Pulseanimated-pulseterraeComponentsFree1 dep
Map Arc Animatedarc-animatedterraeComponentsFree1 dep
Map Blur Areablur-areaterraeComponentsFree1 dep
Map Camera Followcamera-followterraeComponentsFree1 dep
Map ChoroplethchoroplethterraeComponentsFree1 dep
Map CirclecircleterraeComponentsFree1 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

ToolDrift

What the AI coding tools changed last night

tooldrift.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 ToolDrift

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 ToolDrift

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 ToolDrift

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