BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/terrae/sandstorm

Map Sandstorm

terrae/sandstorm
FreeComponent

Atmospheric sandstorm effect with horizontal particle movement and reduced visibility.

Install it

npx shadcn@latest add https://www.terrae.dev/sandstorm.json

Source

src/registry/map/sandstorm.tsxwww.terrae.dev/sandstorm.json · first 6 KB
1"use client"
2
3import { useEffect, useId, useRef, useState, useCallback } from "react"
4import { createPortal } from "react-dom"
5import { useMap } from "./hooks"
6
7type RgbColor = {
8 red: number
9 green: number
10 blue: number
11}
12
13type SandParticle = {
14 x: number
15 y: number
16 size: number
17 speed: number
18 opacity: number
19 wobble: number
20 wobbleSpeed: number
21}
22
23type SandstormControl = {
24 start: () => void
25 stop: () => void
26 setIntensity: (intensity: number) => void
27 isActive: boolean
28}
29
30type SandstormOverlayProps = {
31 intensity: number
32 particleCount: number
33 color: string
34 windSpeed: number
35 windDirection: number
36 visibility: number
37 turbulence: number
38 isActive: boolean
39 onControlReady: (control: SandstormControl) => void
40}
41
42type MapSandstormProps = {
43 id?: string
44 intensity?: number
45 particleCount?: number
46 color?: string
47 windSpeed?: number
48 windDirection?: number
49 visibility?: number
50 turbulence?: number
51 autoStart?: boolean
52}
53
54const DEFAULT_INTENSITY = 1
55const DEFAULT_PARTICLE_COUNT = 200
56const DEFAULT_COLOR = "#d4a574"
57const DEFAULT_WIND_SPEED = 4
58const DEFAULT_WIND_DIRECTION = 0
59const DEFAULT_VISIBILITY = 0.3
60const DEFAULT_TURBULENCE = 0.5
61
62const MIN_INTENSITY = 0.1
63const MAX_INTENSITY = 3
64const BOUNDS_PADDING = 10
65const PARTICLE_MIN_SIZE = 1
66const PARTICLE_SIZE_RANGE = 3
67const PARTICLE_MIN_SPEED = 2
68const PARTICLE_SPEED_RANGE = 4
69const PARTICLE_MIN_OPACITY = 0.3
70const PARTICLE_OPACITY_RANGE = 0.5
71const PARTICLE_MIN_WOBBLE_SPEED = 0.02
72const PARTICLE_WOBBLE_SPEED_RANGE = 0.04
73const DEGREES_TO_RADIANS = Math.PI / 180
74const TURBULENCE_MULTIPLIER = 20
75const VERTICAL_WOBBLE_FACTOR = 0.1
76const HAZE_OPACITY_FACTOR = 0.4
77const CONTROL_UPDATE_INTERVAL = 100
78const DEFAULT_SAND_RGB: RgbColor = { red: 212, green: 165, blue: 116 }
79
80const sandstormControls = new Map<string, SandstormControl>()
81
82const hexToRgb = (hex: string): RgbColor => {
83 const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)
84
85 if (!result) {
86 return DEFAULT_SAND_RGB
87 }
88
89 return {
90 red: parseInt(result[1], 16),
91 green: parseInt(result[2], 16),
92 blue: parseInt(result[3], 16),
93 }
94}
95
96const createParticle = (
97 canvasWidth: number,
98 canvasHeight: number,
99 windDirection: number,
100 intensity: number
101): SandParticle => {
102 const angle = windDirection * DEGREES_TO_RADIANS
103 const startFromLeft = Math.cos(angle) > 0
104
105 return {
106 x: startFromLeft ? -BOUNDS_PADDING : canvasWidth + BOUNDS_PADDING,
107 y: Math.random() * canvasHeight,
108// … truncated

What it pulls in

npm packages

  • mapbox-gl

Other registry items

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

Files it writes

  • src/registry/map/sandstorm.tsx

Facts

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

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 Footprintanimated-footprintterraeComponentsFree2 deps
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

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