shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Tell people where to go and the way there, with this evacuation routes map for React with Base UI. Egresswell, a county emergency office, shades six hurricane evacuation zones on a live Map of Galveston County, Texas, that follows your theme: Galveston Island in three, the Bolivar Peninsula, Texas City, and San Leon with Bacliff. A Radio Group in the rail chooses your zone, each with its shelter town and minutes, and its road route to its assigned shelter inland is drawn along the real roads in the one primary colour; the map frames the whole county, so every zone and shelter stays in view. Under the map its turns are numbered steps with their kilometres, the minutes on clear roads, and the shelter's beds as a Progress meter and in words ("412 of 600 beds taken"). A Switch, "Avoid the I-45 causeway", swaps in the route over the San Luis Pass bridge for the three island zones, sends them to a different shelter, marks the causeway on the map and says how much longer the drive is; the mainland and Bolivar routes never cross it. Built from Map, Radio Group, Switch, Progress, Field and Guides. For county emergency offices, councils and campus safety teams.
FAQ
Where do the routes come from, and what stays local?
Each route was asked of the public OSRM router once while the block was written, simplified and typed into ROUTES, with its turns condensed by hand into STEPS and its minutes and kilometres in LINES. The zones in AREAS were drawn along the real island, peninsula and bay shore. Nothing is fetched but the map tiles and nothing is sent. The places and roads are real; Egresswell, the zones, the shelters and their beds are invented, so never use a demo like this for a real evacuation.
How are the minutes worked out?
They are the router's driving times on clear roads, rounded to the minute. A real evacuation is much slower, with contraflow, queues and closures, so a live service would take travel times from its traffic feed and say when they were measured.
What does the switch do?
It swaps each island zone's usual route over the I-45 causeway for its typed route west over the San Luis Pass bridge to Shelter 4 in Angleton, and marks the causeway on the map. For the West End that costs about a minute; for Seawall and Midtown 39 minutes more, and for Downtown 43. Bolivar, Texas City and San Leon keep their routes, and the line under the title says the trip never crosses the causeway.
Can I use it without a mouse?
Yes. The zones are a radio group with the arrow keys, the switch is a real switch with its hint, and the turns are a numbered list. The letters on the map are a pointer shortcut to the same choice, and a polite message reads the route, its time and the beds once the choice settles.
What do the marks on the map mean?
Shaded areas are the zones, the chosen one darker, each with its letter; squares with a bed are the shelters, numbered as in the steps, and the chosen shelter is filled and named. The route is the one line in the theme's primary colour, over a halo so it reads on any basemap.





