shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Put thousands of points on a map and still read each one, with this dense points map for Solid with Ark UI. Fulgrid, a lightning detection network, draws three hours of a spring storm over Oklahoma and Kansas, two thousand strikes, on a live Map that follows your theme, light or dark. Every strike is a dot painted on the map's canvas rather than an element in the page, so the whole storm pans and zooms smoothly: a squall line marching east, two stronger cells ahead of it and scattered strikes in the rain behind. Each dot steps up the chart ramp with its peak current, and a positive strike is a ring rather than a dot, so polarity never rests on colour. Hover a strike and a popup reads it: its current, the second it struck and how far it fell from the nearest town; on a phone a tap pins the same card. A Toggle Group filters by peak current (All, 10, 25 or 50 kA and over), and the toolbar counts the strikes in view, read again each time the map comes to rest. Under the map the six strongest in view are a list; pressing one flies there and opens its card. Built from Map, Toggle Group, Button, Empty and Guides. For weather, sensor, telemetry and any map with more points than a page can hold as elements.
FAQ
Why draw the points on the canvas?
A marker is an element in the page, and a few hundred of them start to drag on every pan. Here the strikes are one GeoJSON layer of circles, painted by MapLibre on the map's own canvas with the GPU, so two thousand cost about what one does. Their paint reads each strike's band and polarity from its properties, and the hovered strike's larger dot and outline come from MapLibre's feature state, so nothing is re-rendered as the pointer moves.
How is the count in view worked out?
A small watcher inside the map reads its corners (west, south, east and north) each time it comes to rest after a pan or a zoom, and when it is resized; a strike is in view when its place falls inside them and it passes the current filter. The list of the strongest in view comes from the same strikes, so zooming into one cell ranks that cell's strikes.
Where does the storm come from, and what stays local?
It is a seeded sample made when the file loads: a squall line typed by its ends and its drift, two cells by their paths, and strikes scattered round them with log-normal currents and a share of positives. The same stream gives the same storm on every render and every target. The towns are real; Fulgrid and every strike are invented, and nothing is fetched or sent except the map's tiles. It is not for safety decisions.
What does the peak current filter do?
Each step keeps the strikes whose current, positive or negative, is at least that many kiloamperes. The four collections are made once when the file loads, so a press swaps the layer's data rather than rebuilding it; the count, the list and the map follow together, and a card whose strike is filtered out closes.
Can I use it without a mouse?
Yes. The filter is a toggle group, the six strongest in view are buttons that fly the map to their strike and open its card, and the zoom and whole-storm buttons are in the tab order; the map takes the arrow keys and plus and minus once focused, so panning changes the count and the list. Escape or the card's close button closes it. A polite message gives the count once the map settles.
How does it look on a phone?
The filter and the count sit above the map, the legend moves under it, and the list rows take two lines each. Hovering isn't there, so a tap on a strike pins its card; flying to a strike from the list stops one zoom level further out than on a wide screen. Scrolling over the map scrolls the page; two fingers pan it.





