BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/mapcn/analytics-map

Analytics Map

mapcn/analytics-map
FreeBlock

Real-time analytics overview with a world map, breakdown cards, and device stats.

Install it

npx shadcn@latest add https://mapcn.dev/r/analytics-map.json

Source

src/registry/blocks/analytics-map/page.tsxmapcn.dev/r/analytics-map.json
1"use client";
2
3import {
4 Map,
5 MapControls,
6 MapGeoJSON,
7 MapMarker,
8 MarkerContent,
9 MarkerTooltip,
10} from "@/components/ui/map";
11import { OverviewCard } from "./components/overview-card";
12import { BreakdownCard } from "./components/breakdown-card";
13import {
14 locations,
15 visitedPagesRows,
16 countriesRows,
17 referrersRows,
18 browsersRows,
19} from "./data";
20
21const MAP_HEIGHT = "38rem";
22
23// Country borders from a public CDN, or swap in your own GeoJSON.
24const WORLD_GEOJSON =
25 "https://cdn.jsdelivr.net/gh/nvkelso/natural-earth-vector@v5.1.2/geojson/ne_110m_admin_0_countries.geojson";
26
27export default function Page() {
28 return (
29 <div
30 className="bg-background relative min-h-screen"
31 style={{ "--map-height": MAP_HEIGHT } as React.CSSProperties}
32 >
33 <div className="bg-card relative h-(--map-height)">
34 <Map
35 center={[-2, 16]}
36 zoom={1.4}
37 maxZoom={4}
38 minZoom={1.4}
39 scrollZoom={false}
40 dragRotate={false}
41 pitchWithRotate={false}
42 renderWorldCopies
43 blank
44 >
45 <MapGeoJSON data={WORLD_GEOJSON} linePaint={false} />
46 <MapControls className="bottom-2" />
47 {locations.map((location) => (
48 <MapMarker
49 key={location.city}
50 longitude={location.lng}
51 latitude={location.lat}
52 >
53 <MarkerContent className="group">
54 <div
55 className="bg-chart-2/80 group-hover:bg-chart-2/90 rounded-full transition-[transform,background-color] group-hover:scale-110"
56 style={{
57 width: location.size * 3,
58 height: location.size * 3,
59 }}
60 />
61 </MarkerContent>
62 <MarkerTooltip
63 offset={20}
64 className="bg-popover text-popover-foreground border"
65 >
66 <p className="font-medium">{location.city}</p>
67 <p className="text-muted-foreground mt-0.5">
68 {location.size} active users
69 </p>
70 </MarkerTooltip>
71 </MapMarker>
72 ))}
73 </Map>
74 <div
75 className="via-background/30 to-background pointer-events-none absolute inset-x-0 bottom-0 h-40 bg-linear-to-b from-transparent"
76 aria-hidden
77 />
78 <OverviewCard />
79 </div>
80
81// … truncated

What it pulls in

npm packages

  • recharts
  • lucide-react

Other registry items

  • @mapcn/map
  • card
  • chart

Files it writes

  • src/registry/blocks/analytics-map/page.tsx
  • src/registry/blocks/analytics-map/data.ts
  • src/registry/blocks/analytics-map/components/overview-card.tsx
  • src/registry/blocks/analytics-map/components/breakdown-card.tsx

Facts

Registry
mapcn
Type
registry:block
Access
Free
Files written
4
Licence
MIT
First indexed
2026-08-03
Last confirmed
today

Go to the source

mapcn.dev AnmolSaini16/mapcn on GitHub Raw registry item This item as JSON

More from mapcn

All 9 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Analytics Cardanalytics-cardmapcnBlocksFree1 dep · 2 files
ChoroplethchoroplethmapcnBlocksFree2 deps · 3 files
Delivery Trackerdelivery-trackermapcnBlocksFree1 dep · 2 files
HeatmapheatmapmapcnBlocksFreeno deps
Logistics Networklogistics-networkmapcnBlocksFree1 dep · 4 files
Store Locatorstore-locatormapcnBlocksFree1 dep · 4 files
Uptime Monitoruptime-monitormapcnBlocksFree1 dep · 4 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex