Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultUI componentsDotted Locations Globe
Team Card SliderBrowse all 182Scroll Spy Nav
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Dotted Locations Globe

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • CustomEase

Setup

npm i gsapregisterPlugin(CustomEase)

More like this

  • Globe
  • Line drawing
  • 3D
  • Draggable
  • Canvas

Features.

  • A dotted globe of real coastlines that drifts on its own and can be dragged and thrown
  • Your locations as markers with real button labels floating over them, nudged apart so they never overlap
  • Lines keep drawing between random pairs of locations, lifted off the surface on great circles
  • Pick a location from the pill, its label or its marker and the globe turns to face it, the marker lifts and a line races from where you were
  • The pill's name rolls over letter by letter, and prev / next find the nearest location in that direction
  • Plain 2D canvas: no WebGL, no images, the land map is built in
  • Runs only while the section is on screen
  • Respects prefers-reduced-motion: no drift, throw or route lines, instant turns; drag still turns the globe

How to get it right.

Load GSAP and CustomEase first

The script reads window.gsap and window.CustomEase. Load both before code.js.

One button per location

Each <button data-rgl-site data-lat data-lon> is a location: its text is the name, data-lat / data-lon are decimal degrees (south and west negative). The first one starts in focus. You need at least two.

Spread them out

Lines only draw between locations at least 25° apart, and labels on the same side of the globe push each other aside. Ten to fifteen locations across several continents look best; a cluster in one city reads as one blob.

Retheme with variables

--rgl-land colours the land dots and the line fired when you switch, --rgl-ink the markers, routes, grid and leaders. The script re-reads both when data-theme or the class on <html> changes. --rgl-chip is the glass behind labels and the pill.

Tune the globe

data-au-drift sets the idle spin, data-au-routes how many lines draw at once, data-au-density how many points are sampled (more = finer coastlines, more drawing), and data-au-dot the size of each land dot.

Variations.

  • Network — the default: 4°/s drift, 3 routes, 11,000 points
  • Busy hub — data-au-routes="7" for a web of supply lines
  • Fine print — data-au-density="20000" and data-au-dot="1.4"
  • Poster — data-au-density="5000" and data-au-dot="3.6" for chunky land
  • Still — data-au-drift="0": it only moves when dragged or a location is picked

Where it fits.

  • Studios and offices — where the team is, one click to each
  • Shops and stockists — a playful store finder
  • Events and tours — dates on a world map
  • Logistics and travel — the routes are the story

Frequently asked.

Yes. It ships without them. Inside the root, add <div class="rgl_head" data-rgl-reveal> holding an <h2 class="rgl_title">, <p class="rgl_note" data-rgl-reveal> or <div class="rgl_count" data-rgl-reveal>. In React, pass title, note and count. They're plain text; the script only fades them in.

The land mask is built into the script, a 1° grid from Natural Earth (public domain). Swapping it means replacing the LAND_RUNS string.

Yes. They're real buttons, and labels round the back of the globe leave the tab order. The pill's buttons work too, and the current name is announced politely.

Yes. Drag the globe with a finger; the canvas takes the touch, so start a page scroll outside the globe.

Related components.

Pro

Image Slide Tabs

Click

Pro

Glow Band Sheet Modal

Click

Pro

Expanding Card Modal

Click