shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Show what a fiber cut costs, with this fiber network map for React with Base UI. Strandlight, a carrier network, runs a network operations screen over a live Map that follows your theme: eight US cities joined by eleven backbone links laid along the interstates, each drawn as wide as its capacity (10, 40, 100 or 400 Gbps). The list of links beside the map is the way in: choose a link, or click it on the map, and a Switch cuts it; the cut link turns dashed, says Cut in the list and is struck through, and the chosen link is drawn thicker in the primary colour. Dijkstra's shortest-path search over the links still in service then re-routes five city pairs, and a Table gives each pair's latency before and now, the cities it passes through, or Unreachable when no path remains, with the change in milliseconds. A Badge in the top bar counts the cuts and Restore all brings every link back. Built from Map, Switch, Table, Badge, Button and Guides. For carriers, network operations tools and resilience reviews.
FAQ
How is the new route chosen?
routeOf runs Dijkstra's shortest-path search over the links not in the cut list, weighing each link by its latency, and returns the total and the cities in between, or nothing when the far city can't be reached. The Before column is the same search with nothing cut.
Where do the latencies come from?
From the links' lengths. Each link follows the driving route between its two cities, baked into the file from OSRM once and never fetched, and its one-way latency is that length over 200 km per millisecond, about the speed of light in glass. Real backbones add equipment and detours, so read the numbers as a floor.
Can I cut more than one link?
Yes. Choose a link, turn its switch on, then choose another; every cut stays until you turn its switch off or press Restore all. The screen opens with Denver to Chicago cut. Cut Seattle to San Francisco and Seattle to Chicago together and Seattle's routes become Unreachable.
What stays local in the demo?
All of it. The cities and roads are real; Strandlight, the capacities and the cuts are invented, typed in CITY_LINES, LINK_LINES and PAIRS. Nothing is switched or sent: the search runs in the page. The map tiles come from CARTO's basemaps over OpenStreetMap data.
Can I use it without a mouse?
Yes. Every link in the list is a button with a pressed state that names its cities, capacity, latency and whether it is up; the switch is labelled and the table is plain text. Clicking a line on the map is a pointer shortcut to the same choice. A polite message says how many routes changed once a cut settles.
How does it look on a phone?
The map comes first, then the list of links and the chosen link's switch, then the table, which keeps the latency now and the change, drops the Before and path columns, and shows the path under the route's name. Cutting a link changes the numbers, never the length of the page.





