Loading component…
Loading component…
DACH map with fading neighbours and a pastel band along the border, switchable to the US, China, India, Brazil or Japan
import { RegionDach } from "@/components/ui/region-dach";
export function TerritorySection() {
return (
<section style={{ maxWidth: 420 }}>
<RegionDach />
</section>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| region | "dach" \| "us" \| "cn" \| "in" \| "br" \| "jp" | Shown region (controlled). Pair it with onRegionChange to keep the menu working | |
| defaultRegion | Region | "dach" | Region shown first when region is not set |
| onRegionChange | (region: Region) => void | Called when the viewer picks a region in the menu | |
| showSwitcher | boolean | true | Show the region menu in the top-left corner |
| label | string \| ((region: Region) => string) | "Map of the DACH region: Germany, Austria and Switzerland" / "Map of Japan" … | Accessible description of the map; by default it follows the current region |
| className | string | Extra class on the root, e.g. for width or margins |
Transparent background; the neighbouring countries fade out towards the edges, so it sits on any light or dark surface
Keeps a 540 : 440 aspect ratio and scales to the width of its container – set a width or max-width via className
The menu scales down with the illustration (to about 60 %) so it still fits in small previews
The file embeds the map data for all six regions (about 155 KB)
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"
@import "tailwindcss"; in your main CSS file.