globeplot
v1.5.0
Published
CLI to add the Globe component to your Next.js project
Downloads
189
Maintainers
Readme
Globeplot
A CLI tool to easily add an interactive 3D globe component to your Next.js project.
Features
- 🌍 Interactive 3D Globe - Rotate, zoom, and explore the globe with smooth animations
- 📍 Location Markers - Plot locations with latitude/longitude coordinates
- 🎨 Customizable - Filter by country/state/city and adjust aggregation modes
- 🎭 Visual Variants - Switch between 6 stunning styles (Hologram, Night, Vintage, etc.)
- 📱 Responsive - Works seamlessly on desktop and mobile
- 🚀 Easy Installation - One command to add to your project
Installation
Use the CLI directly with npx or pnpm dlx:
npx globeplot addor with pnpm:
pnpm dlx globeplot addWhat it does
The CLI will:
- Create a
componentsdirectory if it doesn't exist - Copy
globe.tsxcomponent tocomponents/globe.tsx - Copy
global-breakdown.tsxcomponent tocomponents/global-breakdown.tsx - Copy all map texture images (Default, Night, Hologram, etc.) to
public/
Components
- Globe - The core 3D globe component with interactive rotation, zoom, and location markers
- GlobalBreakdown - A wrapper component that adds filter controls (country/state/city) and aggregation modes
Usage
After running the CLI, you can import and use the components:
Basic Globe Component
import Globe from "@/components/globe";
const data = [
{
name: "New York",
city: "New York",
state: "New York",
country: "United States",
lat: 40.7128,
lon: -74.006,
visitors: 10000,
},
// Add more locations...
];
export default function Page() {
return <Globe data={data} variant="hologram" />;
}Globe with Filters (GlobalBreakdown)
import GlobalBreakdown from "@/components/global-breakdown";
const data = [
// Same location data as above
];
export default function Dashboard() {
return <GlobalBreakdown locationsData={data} />;
}Component Props
data: LocationData[]- Array of location data with lat/lon coordinatesfilterCountry?: string- Filter locations by countryfilterState?: string- Filter locations by statefilterCity?: string- Filter locations by cityaggregationMode?: 'country' | 'state' | 'city'- How to aggregate/cluster locationsvariant?: 'default' | 'minimal' | 'hologram' | 'vintage' | 'night' | 'dark-gold'- Visual style presetmapImage?: string- Path to custom map image (overrides variant)
Available Variants
| Variant | Description |
| :---------- | :--------------------------------------------- |
| default | Standard earth map with cyan markers |
| minimal | Light/Dark minimal map with monochrome markers |
| hologram | Blue digital map with glowing blue markers |
| vintage | Sepia-toned map with amber markers |
| night | Dark earth map with sky blue markers |
| dark-gold | Dark map with gold markers |
