Skip to content

shadcn.io is an independent project built on shadcn/ui

Earthquake Monitor Map Block for React

About 170 quakes round the Pacific on a live globe, sized by magnitude and shaded by depth, with sliders for the days and the size and the top five listed.

On this page5 sections

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Watch where the ground moved this fortnight, with this earthquake monitor map for React with Base UI. Tremorwell, a seismology service, plots about 170 quakes of magnitude 4.5 and over on a live Map drawn as a globe, along the real trenches and island arcs of the Ring of Fire, from Japan and the Kurils to the Andes, Tonga and Vanuatu. Each quake is a circle that grows with its magnitude and steps through the theme's chart colours by its depth (shallow, intermediate, deep), with a legend over the globe that names the steps. Under the globe a dock holds the filters: a day-by-day bar chart with a two-thumb Slider for the window, whose bars outside it fade, and a second Slider for the smallest magnitude; the globe, the counts and the list follow both. The five largest in the window are a list of buttons, and pressing one, or a circle on the globe, rings it with its magnitude and turns the globe to it; the globe button turns back to the middle of the Pacific. A window with nothing in it shows an empty state in the list's own box. Built from Map, Slider, Button, Empty and Guides. For seismology, insurance, education and news tools.

FAQ

Where do the quakes come from, and what stays local?

From the file. ARCS lists 25 real subduction zones as a start and end point with their depth range and a weight, and a small seeded generator scatters quakes along them with Gutenberg–Richter magnitudes, so each step of one magnitude is ten times rarer; LARGE adds six typed quakes of 6 and over. Every time is fixed against AS_OF, so the page prints the same on the server and in the browser. Nothing is fetched but the map tiles: it is sample data, not a live feed and not for real alerts.

Why a globe?

The Ring of Fire spans more than half the world's longitude, across the date line, which a flat map can't centre. The globe faces the middle of the Pacific at the start, sized to the map, and turns to each quake you choose; the zoom buttons bring it closer. Drag to turn it; on a phone use two fingers.

How are magnitude and depth shown?

Magnitude is the circle's size, from 3 pixels at 4.5 to 14 at 7. Depth is a step of the chart ramp: shallow under 70 km, intermediate to 300 km, deep beyond, named in the legend. The list repeats both in words, with the time in UTC.

How do the two sliders work?

The two-thumb slider sets the first and last day of the window over the bar chart, and the bars outside it fade. The magnitude slider sets the smallest quake shown, in tenths from 4.5 to 7. Both filter the globe, the count and the top five at once, and the bar chart counts only the quakes at or over the chosen magnitude.

Can I use it without a mouse?

Yes. Both sliders take the arrow keys and read their values out, the five largest quakes are buttons, and the globe takes the arrow keys and plus and minus once focused. A polite message gives the count, the largest quake or the chosen one once a slider settles.

How does it look on a phone?

The globe comes first, the depth legend moves under it as a row, and the bar chart, the two sliders and the list of five follow at full width. The list keeps its height, so filtering never moves the page.