Loading preview
A WebGL sphere of evenly spaced dots that slowly turns; drag or use the arrow keys to spin it.
A dotted 3D Earth with glowing routes between cities; pulses travel each arc and ripple where they land.
npx shadcn@latest add @venusui/arc-globeRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/hooks/use-scene-state.tsfrom use-scene-state@/components/ui/arc-globe.tsx@/lib/land-mask.tsThe code behind the preview above.
arc-globe-demo.tsx
import { ArcGlobe } from "@/components/ui/arc-globe"
export default function ArcGlobeDemo() {
return <ArcGlobe className="max-w-md" />
}
| Prop | Type | Default | Description |
|---|---|---|---|
| routes | { from: [lat, lon]; to: [lat, lon] }[] | 12 links between major cities | Arcs to draw, as latitude/longitude pairs in degrees. |
| startLongitude | number | 20 | Longitude turned toward the viewer at the start. |
| speed | number | 0.07 | Auto-rotation speed, in radians per second. |
| pulseSpeed | number | 1 | How fast pulses travel along the arcs. |
| dots | number | 16000 | Points sampled over the sphere; about a third fall on land and are drawn. |
| dotSize | number | 2.4 | Dot size in pixels. |
| arcColors | [string, string] | ["#a78bfa", "#22d3ee"] | Start and end color of each arc; the end color is also used for landing rings. |
| atmosphereColor | string | "#6d5dfc" | Color of the glow around the rim. |
| label | string | "Globe with routes between cities" | Accessible description of the graphic. |
| className | string | — | Classes for the wrapper; set the dot color with a text class. |
Only the props above.
three and @react-three/fiber (React 19). The CLI installs both, plus @types/three as a dev dependency.lib/land-mask.ts, an 11 KB map of the continents (Natural Earth 1:110m, public domain).routes, for example your offices or data centers: [{ from: [51.5, -0.13], to: [40.71, -74] }].className="text-primary" tints the continents and follows theme changes.arcColors and atmosphereColor go to three.js, which reads hex, rgb() and hsl() but not oklch().text-transparent and contrasts with the background.rgb() or hsl() color.Cannot find module 'three' types.npm install -D @types/three.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A WebGL sphere of evenly spaced dots that slowly turns; drag or use the arrow keys to spin it.
Cards arranged in a ring that turns in 3D, with buttons, arrow keys and announcements.
A card that tilts toward the pointer while its layers rise off the surface, each to its own depth.