shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Show where a price comes from, with this property valuation map for React with Base UI. Plinthcheck, a property price guide, values four flats in De Pijp, Amsterdam, from twelve flats sold there this year, each at its real street on a live Map that follows your theme, light or dark. A Native Select floating over the map picks the flat to value (its house marker does too); the map flies there and joins it by lines to its three nearest sales, each a pill with its price per square metre. A Table under the map lists those three sales with the date, area, distance, price and price per square metre, and each has an Include Checkbox: untick a sale that does not compare and its line turns dashed, its pill hollow, and the figures re-derive. The estimate is the median price per square metre of the included sales times the flat's area, rounded to the nearest thousand euros; the range runs from the cheapest to the dearest included sale. Three cells under the map read estimate, range and sales used. Built from Map, Native Select, Checkbox, Table and Guides. For property price guides, mortgage tools and appraisal pages.
FAQ
How is the estimate worked out?
Each included sale gives a price per square metre, its price over its area. rateOf takes the median of those (the average of the middle two when two are included), estimateOf multiplies it by the flat's area and rounds to the nearest thousand euros, and lowOf and highOf do the same with the lowest and highest rate for the range. No figure is typed twice: the cells, the table and the message all read these helpers.
How are the comparable sales chosen?
compsOf sorts the twelve sales by their distance on the ground from the chosen flat (metresBetween, a flat-earth distance that is close enough inside one neighbourhood) and keeps the nearest three. Real comparables also match type, size, floor and age, so in your app rank by those too, and let the person untick the sales that do not fit, as here.
What if every sale is unticked?
The estimate and the range say None, the count says 0 of 3 and the polite message says there is no estimate; tick a sale and they return. Nothing moves meanwhile: the cells and the table keep their size, and the dashed lines and hollow pills stay on the map.
Can I use it without a mouse?
Yes. The select is labelled Flat to value (on a phone the label is hidden from view but still names it), each Include box is a real checkbox named by the sale's street, and the zoom buttons work from the keyboard; the map itself takes the arrow keys and plus and minus once focused. The house markers are a pointer shortcut to the same choice as the select. A polite message gives the new estimate, range and count once a change settles.
Is the data real, and what stays local?
The streets and their places are real; the flats, the sales, the prices and Plinthcheck are invented sample data, and this is not a valuation. Nothing is fetched but the map tiles (CARTO's basemaps over OpenStreetMap data, credited in the corner) and nothing is sent. In your app load sold prices near the address, keep the median in one helper, and show the method and the sale dates wherever you show the figure.
How does it look on a phone?
The map comes first with the select floating over it, then the estimate across the full width with the range and the sales used side by side under it, then the table, which keeps the sale and its price per square metre and puts the area and distance under the street. Scrolling the page over the map scrolls the page; two fingers move the map.





