shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Rebalance a sales quarter by handing territories between reps, with this sales territories map for React with Base UI. Quotabridge, a sales-ops tool, groups the lower 48 states and DC into eight territories on a live Map with the real state borders from Natural Earth: every state takes its rep's shade of the theme's chart colours, and each territory's pill names the rep, A to E, and what it has booked this quarter. A territory nobody covers has no fill, a dashed outline and an Open pill. Under the map a Table lists the eight with their bookings and a Native Select on every row to assign a rep, and five Progress bars beside it re-derive each rep's bookings against quota and say in words who is over. Choosing a territory, by its row, its pill or any of its states, flies the map to it; the map button frames the country again. Shine Button Save plan, the block's one primary action, keeps the plan in the page and the toolbar counts what is covered and unsaved. Built from Map, Table, Native Select, Progress, Shine Button, Button and Guides. For sales operations, revenue planning and CRM tools.
FAQ
Where do the borders and figures come from, and what stays local?
The state borders are Natural Earth's 1:110m states, loaded from a pinned release on jsDelivr, the only file the block fetches besides the map tiles. The territories, reps, bookings and quotas are typed in LINES and REPS and are invented sample data. Save plan keeps the plan in the page's state only: nothing is stored or sent, and the status line says so.
How are the states filled?
fillFor builds one map style from the plan: each state whose territory belongs to rep A takes the first chart colour, B the second, and so on to E, and the chosen territory is drawn stronger. An open territory's states have no fill and a second layer draws them a dashed outline. The colour is only a hint: every territory's pill carries the rep's letter, and the table names the rep in words.
How is a rep's bar worked out?
bookedOf adds the bookings of every territory assigned to the rep, and the bar shows that against the rep's quota, full at 100 percent. The line under it gives both figures and the gap in words: how far to quota, or how far over. Each change to a select updates all five bars at once.
Can I use it without a mouse?
Yes. Every territory's name in the table is a button that flies the map to it, every rep select is a native select, and Save plan and the map's buttons are buttons. The focused map takes the arrow keys and plus and minus. The pills and the states on the map are a pointer shortcut to the same choice, and a polite status line reports each reassignment and save.
How does it look on a phone?
The toolbar with Save plan stays on top, the map follows with each pill reduced to its rep's letter, and the table keeps its three columns with shorter names in the selects. The five reps' bars come last, one under another. Scrolling over the map scrolls the page; two fingers pan it.
Can I use my own territories?
Yes. A territory in LINES is a name, its bookings, its starting rep, where its pill stands, a frame for the camera and the postal codes of its states, so redrawing the plan is editing those codes. For counties or postcodes, give MapGeoJSON a boundary file with an id property and match on that instead of postal.





