shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Show where the rain is going over the next hour, with this rain radar map for React with Ark UI. Rainfold, a rain nowcast app, covers the Randstad in the Netherlands on a live Map that follows your theme, light or dark: a grid of squares about 3 km across, each shaded in the chart ramp by its rain rate, from drizzle to very heavy, with a legend in millimetres an hour and a thin outline for the radar's reach. A cold front sweeps in from the North Sea with heavier showers in it, in thirteen frames five minutes apart. Play the hour runs the loop once and stops by itself, the same button pauses it, and a Slider scrubs to any frame. Under it, the rain at one place: pick one of seven towns in the select or on the map, or press anywhere on the radar to drop a pin. Its hour is a bar chart, one bar a frame with the scrubbed one ringed, and a sentence says when the rain starts, when it peaks and when it stops. Built from Map, Slider, Native Select, Button and Guides. For weather apps, outdoor event planners, delivery and field-work dashboards.
FAQ
Where does the rain come from?
It's invented. The file types a cold front (its angle, speed, width and peak) and five showers (where each forms, how it drifts, how strong it gets and how long it lasts), adds a fixed speckle from a small seeded generator, and works out every square of all thirteen frames once, at module scope. The same loop plays on every visit, nothing is fetched, and it is not a forecast. The towns and their places are real.
Does the loop run forever?
No. Play the hour steps through the thirteen frames, from now to an hour from now, and stops on the last one; Pause stops it anywhere, and moving the slider pauses it too. With reduced motion on, the button reads Next 5 min and moves one frame a press, so nothing moves by itself.
How is the rain at a place worked out?
The block finds the radar square the place falls in and reads its rate at every frame, so the bars match the map exactly. The sentence finds the first wet frame, the heaviest one and the first dry frame after the rain, for instance dry until 14:35, heaviest at 14:45, still raining at the end of the hour. A pin outside the radar's outline says it has no radar.
Why does the ramp turn round in dark mode?
On a light map the heaviest rain is the darkest square; on a dark map the darkest square would sink into the ground, so the radar reads the map's theme and puts the lightest shade on the heaviest rain. Every shade is named with its range in the legend, and the bar chart has dashed lines at 1, 5 and 10 mm an hour.
Can I use it without a mouse?
Yes. The play button, the time slider (arrow keys, a frame a press) and the town select all work from the keyboard, and a polite message reads the place's rain once a change settles. Dropping a pin needs a pointer; the seven towns cover the same choice from the select.
How does it look on a phone?
The map comes first with the legend under it, then the play button with the time beside it and the slider at full width, then the place and its bar chart. Scrolling the page over the map scrolls the page: two fingers pan it, and the map's buttons zoom it. The map tiles are CARTO's basemaps over OpenStreetMap data, with their credit in the corner.





