āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/karthikmudunuri/eldoraui/components/cobe-globe ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
npx shadcn@latest add @eldoraui/cobe-globe
</TabsContent>
<TabsContent value="manual">
<Steps>
<Step>Copy and paste the following code into your project.</Step>
components/eldoraui/cobe-globe.tsx
<Step>Update the import paths to match your project setup.</Step>
</Steps> </TabsContent> </Tabs>Interactive globe with drag functionality and auto-rotation, featuring colorful location markers and customizable settings.
<ComponentPreview name="cobe-globe-demo" />Pure auto-rotating globe with colorful markers, no user interaction.
<ComponentPreview name="cobe-globe-demo-2" />Auto-rotating globe that pauses rotation when dragged by the user.
<ComponentPreview name="cobe-globe-demo-3" />Interactive globe with clickable location buttons for navigation to custom locations.
<ComponentPreview name="cobe-globe-demo-4" />Horizontally-oriented globe perfect for wide layouts and banners.
<ComponentPreview name="cobe-globe-demo-5" />import { Cobe } from "@/components/eldoraui/cobe-globe"
<Cobe variant="default" className="h-[600px] w-full" />
// Default: Interactive with drag + auto-rotation
<Cobe variant="default" />
// Draggable: User drag only
<Cobe variant="draggable" />
// Auto-draggable: Auto-rotation + drag override
<Cobe variant="auto-draggable" />
// Auto-rotation: Pure auto-rotation
<Cobe variant="auto-rotation" />
// Location-based: Clickable location navigation
<Cobe variant="rotate-to-location" locations={[
{ name: "New York", lat: 40.7128, long: -74.006 },
{ name: "Tokyo", lat: 35.6895, long: 139.6917 }
]} />
// Scaled: Horizontally-oriented for wide layouts
<Cobe variant="scaled" />
<Cobe
variant="default"
phi={0}
theta={0.2}
mapSamples={16000}
mapBrightness={1.8}
mapBaseBrightness={0.05}
diffuse={3}
dark={1.1}
baseColor="#ffffff"
markerColor="#fb6415"
markerSize={0.05}
glowColor="#ffffff"
opacity={0.7}
/>
| Prop | Type | Default | Description |
| ------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
| variant | "default" \| "draggable" \| "auto-draggable" \| "auto-rotation" \| "rotate-to-location" \| "scaled" | "default" | Globe interaction variant |
| className | string | - | Additional CSS classes for styling |
| style | React.CSSProperties | - | Inline styles for the container |
| locations | Location[] | [{ name: "San Francisco", emoji: "š" }, ...] | Custom locations for rotate-to-location variant |
| phi | number | 0 | Initial rotation angle (phi) |
| theta | number | 0.2 | Initial tilt angle (theta) |
| mapSamples | number | 16000 | Map detail level (higher = more detail) |
| mapBrightness | number | 1.8 | Map brightness multiplier |
| mapBaseBrightness | number | 0.05 | Base map brightness |
| diffuse | number | 3 | Diffuse lighting intensity |
| dark | number | 1.1 | Dark mode intensity |
| baseColor | string | "#ffffff" | Base globe color (hex) |
| markerColor | string | "#fb6415" | Default marker color (hex) |
| markerSize | number | 0.05 | Size of location markers |
| glowColor | string | "#ffffff" | Glow effect color (hex) |
| scale | number | 1.00 | Globe scale (for scaled variant) |
| offsetX | number | 0.00 | Horizontal offset |
| offsetY | number | 0.00 | Vertical offset |
| opacity | number | 0.7 | Globe opacity (0-1) |
interface Location {
name: string
lat?: number
long?: number
emoji?: string
}
The globe includes 13 pre-configured colorful location markers:
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā