shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Show drivers where a fill costs least, with this gas stations map for React with Base UI. Pumpwell, a fuel-price site, puts eight stations on real Toronto streets, from Dundas Street West in the Junction to Carlaw Avenue in Leslieville, on a live Map that follows your theme. A toolbar above the map holds a Toggle Group for the grade (Regular, Mid, Premium or Diesel) and a Number Input for the litres, 40 to begin with. Every station's marker is a pill with that grade's price a litre; the cheapest is filled and labelled "Cheapest". The ruled list under the map totals a fill at each station, cheapest first, and says how far each total sits from the average of all eight ("$2.10 under"), with the street and the extras in words: shop, air and water, car wash, EV charging, open 24 hours. Choosing a station, as a pill or a row, flies the map to it; the map button frames all eight again. Built from Map, Toggle Group, Number Input, Button and Guides. For fuel-price sites, fleet cards and trip planners.
FAQ
How is a total worked out?
The litres times the price a litre, rounded to whole cents: prices are typed in thousandths of a dollar, so 40 litres at $1.569 is $62.76. The average is the mean of all eight totals for the grade, and each row says how far its total sits above or below it. The ranking is by price a litre, so it is the same for any amount.
What does the litres field accept?
Whole litres from 0 to 120, typed or stepped with its buttons or the arrow keys. A blank field counts as 0 and anything higher is held at 120. Digits typed in other scripts, such as Arabic-Indic digits, are read correctly.
What stays local, and how do I use my own stations?
Everything is typed in LINES: an id, the neighbourhood, the street, the longitude and latitude, four prices and the extras. The streets are real; Pumpwell, the stations and the prices are invented sample data, not advice, and nothing is looked up or reported. Only the map tiles load, from CARTO's basemaps over OpenStreetMap data. In your app refresh the prices from your own feed and keep quotesOf as the one place a total is worked out.
Can I use it without a mouse?
Yes. The grade is a toggle group that takes the arrow keys, the litres field has its own buttons, and every station is a button in the list with a pressed state, named with its rank, price, total, gap and extras. The zoom buttons and the map itself (arrows, plus and minus) work from the keyboard; the pills are a pointer shortcut to the same choice. A polite message names the cheapest station once the controls settle.
How does it look on a phone?
The grade spans the width above the litres field, the map follows with smaller pills that drop the dollar sign, and each row shows the total and the gap to the average, with the street and the extras on two lines. Rows keep their height whatever the grade, so the page never jumps.





