Loading component…
Loading component…
This component has not been implemented locally yet.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import AISearch/Regions from ./brand-regions.
import { BrandRegionsScreen } from "@/components/ui/brand-regions";
export default function Page() {
return (
<BrandRegionsScreen
brand="Northwind"
regions={regions} // [{ id: "840", name: "United States", flag: "us", visibility: 52.1, sov: 44.9, sentiment: 72.3, change: { … } }]
answers={5600}
onTab={(tab) => router.push(`/brand/${tab.toLowerCase()}`)}
onNavigate={(label) => router.push(routes[label])}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| onNavigate | (label: string) => void | Called with the label of a sidebar item | |
| brand | string | "Brand" | The page's heading |
| regions | { id; name; flag?; visibility; sov; sentiment; change: { visibility; sov; sentiment } }[] | Every country with data. id is the ISO 3166 numeric code ("840" is the United States) – it finds the country on the map; flag the two-letter code for the drawn flag. Values in percent, change in points against the period before | |
| answers | number | 5600 | How many answers the numbers come from – the button beside the tabs |
| date | Date | The last day of the period, shown in the tooltip | |
| defaultTab | "Visibility" \| "Sentiment" \| "Topics" \| "Platforms" \| "Regions" \| "Shopping" \| "Citations" | "Regions" | The tab the screen opens on |
| onTab | (tab) => void | Called when another tab is picked – route to its page | |
| onAnswers | () => void | The answers button | |
| loading | boolean | A gray map that breathes and gray rows | |
| empty | boolean | No answers yet – the map stays gray with a short note, the list says so too | |
| workspace | string | "Northwind" | The workspace in the sidebar |
| className | string | Extra class on the root |
On narrower screens the regions go under the map; on phones the filters share the row and the tabs scroll sideways
Chart config zooms to the Americas, Europe or Asia, and turns the shading off for one tone
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"