Componentcharts1.06 KB gzipZero dependencies

World Map

Stylized world map grid with region value intensity and hover readout.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add world-map

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { WorldMap } from "@/components/ui/world-map"; <WorldMap />

Source code

world-map.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxworld-map.tsx95 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface CountryValue {  /** ISO 2 harf kod */  code: string;  value: number;} export interface WorldMapProps extends React.HTMLAttributes<SVGSVGElement> {  data: CountryValue[];  /** Maximum density value for color scaling */  height?: number;  onCountryHover?: (code: string | null) => void;} 

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { WorldMap } from "@/components/ui/world-map"; <WorldMap />
PropTypeDescription
dataCountryValue[]Dataset array rendered in charts, grids, or tables. (Default: [])
heightnumberMaximum density value for color scaling
onCountryHover(code: string | null) => voidCallback invoked on country hover.