Loading preview
A dotted 3D Earth with glowing routes between cities; pulses travel each arc and ripple where they land.
A WebGL sphere of evenly spaced dots that slowly turns; drag or use the arrow keys to spin it.
npx shadcn@latest add @venusui/dotted-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/dotted-globe.tsxThe code behind the preview above.
dotted-globe-demo.tsx
import { DottedGlobe } from "@/components/ui/dotted-globe"
export default function DottedGlobeDemo() {
return <DottedGlobe className="max-w-xs" />
}
| Prop | Type | Default | Description |
|---|---|---|---|
| dots | number | 1600 | Number of dots on the sphere. |
| dotSize | number | 2 | Dot size in pixels. |
| speed | number | 0.15 | Auto-rotation speed, in radians per second. |
| label | string | "Rotating globe made of dots" | Accessible description of the graphic. |
| className | string | — | Classes for the wrapper; set the 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.className="text-primary" tints the globe, and it updates when the theme changes.dots look sparser and render faster on low-end phones.text-transparent and the background contrasts.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 dotted 3D Earth with glowing routes between cities; pulses travel each arc and ripple where they land.
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.