Skip to content

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

Bird Sightings Map Block for React

A field log on a live map of Cley Marshes: aim a crosshair, pick one of six species and log a numbered mark shaped by rarity, with removable rows and counts.

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

Let birdwatchers keep a field log without leaving the map, with this bird sightings map for React with Base UI. Wrenlog, a birdwatching diary, opens Cley Marshes on the north Norfolk coast on a live Map that follows your theme, with a crosshair fixed at its middle. Drag the map, use the arrow keys once it has focus, or click a spot to fly the crosshair there, and the rail names the nearest place of the marsh, such as Pat's Pool or Arnold's Marsh, with the distance in metres. A Native Select picks one of six species and the block's one primary, a Shine Button, logs a numbered mark at the crosshair: a circle for a common bird, a square for an uncommon one, a diamond for a rare one. The day's log lists every sighting newest first with its time, its place and a Remove button, and choosing one flies the crosshair back to it; under it, a count per species doubles as the legend. Built from Map, Native Select, Field, Shine Button, Button, Empty and Guides. For nature reserves, bird clubs and outdoor diaries.

FAQ

Where does a new sighting go?

At the middle of the map, under the crosshair. The block keeps the map's centre from onViewportChangeEnd, so a drag, an arrow key or a click on the map (which flies there) all move it, and logIt drops the new mark on that centre. The rail names the nearest of the typed PLACES with a flat-earth distance in metres, or says "at" a place within 60 m.

How are rarity and numbers shown?

Each of the six species has a rarity, and the mark's shape follows it: a circle is common, a square uncommon, a diamond rare. The number in the mark is the order the sighting was logged and never changes when another is removed. The same shapes stand in the log and in the counts per species, which are the legend, so the map never relies on colour.

What stays local, and what is real?

Everything stays in this tab: nothing is submitted, saved or shared, and reloading brings back the six sightings of the morning. The places of the marsh are real, at their real coordinates; Wrenlog, the sightings and their times are invented sample data, and a new sighting's time steps seven minutes on from 08:04 instead of reading a clock.

Can I use it without a mouse?

Yes. Focus the map and the arrow keys pan it under the crosshair, plus and minus zoom; the species select, the Log sighting button, every row and its Remove button work from the keyboard. Choosing a row flies the crosshair to that sighting, and a polite message says where the crosshair rests, what was logged and what was removed.

How does it look on a phone?

The map comes first with the crosshair at its middle, then the species, the place under the crosshair and the Log sighting button, then the log in a box of fixed height that scrolls, then the counts. Two fingers pan the map on a phone, so the page still scrolls over it.

Is there a limit to the log?

The demo keeps up to 12 sightings. With 12 in the log the button stays focusable and says so instead of adding one; remove a sighting to log another, or raise LOG_MAX. In your app, send each sighting to your own store when it is logged.