shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Compare a scene on two dates, with this satellite imagery map for React with Base UI. Skylattice, an earth-observation service, lays a 12.8 by 8 km tile of farmland round Chartres over two live Maps that follow your theme, its vegetation index drawn as a grid of cells in the five steps of the theme's chart ramp, from bare to very dense, under the map's own place names. A Toggle Group over each map picks one of four capture dates of the 2026 season; clouded cells have no reading and show as haze, and the line under each map gives the date and its cloud cover. The two maps share one view: pan or zoom either and the other follows, so the same field sits in the same place on both. A Native Select re-samples the scene at 800, 400 or 200 m cells, a Switch outlines the cells that changed, and the band under the maps counts them ("508 of 623 clear cells changed"), leaving out any cell either date hides. Built from Map, Toggle Group, Native Select, Switch and Guides. For earth-observation services, land-change monitoring and agronomy tools.
FAQ
How are the changed cells counted?
compare walks every cell of the chosen cell size and keeps those with a reading on both dates. A cell counts as changed when its step differs between the two, and a cell under cloud on either date is left out of both numbers, so a cloudy capture never reads as change. Pick the same date on both sides and the band says there is nothing to compare.
What does the cell size change?
The same scene is sampled into 16, 32 or 64 columns, for cells of 800, 400 or 200 m. Each cell reads the field under its centre, so small fields blur into their neighbours at 800 m and show their edges at 200 m, and the counts change with the size. Cloud cover is worked out per size too.
How do the two maps stay in step?
Both maps are held to one view in the block's state: each reports its camera as it moves, and the other jumps to match. The first map frames the scene when it loads. Hold Ctrl or ⌘ and scroll to zoom, or use two fingers on a phone; the zoom buttons sit on the second map.
Is this real imagery, and what stays local?
No. Chartres and its villages are real and sit where the basemap draws them, but the fields, their crops, the readings and the clouds are a seeded sample built in the page, the same on every load. Nothing is fetched but the map tiles, from CARTO's basemaps over OpenStreetMap data. In your app, fill the cells from your own raster statistics.
Can I use it without a mouse?
Yes. Each date bar is a toggle group that takes the arrow keys, the cell size is a labelled select and the outline is a labelled switch; each map takes the arrow keys and plus and minus once focused. The legend and the band say in words what the colours show, and a polite message reads the new count once a choice settles.




