Dir Hub
CategoriesPricing
⌘K
  1. Home
  2. Design
  3. Cobe Js
Cobe Js logo

Cobe Js

A 5KB WebGL globe library for building interactive 3D globes in React, Vue, Svelte, or plain JavaScript.

Cobe Js - Cover Image

About

Cobe Js is a 5KB WebGL globe library for creating interactive 3D globes in web apps. It comes from Vercel's Shu Ding and is built to work with React, Vue, Svelte, or vanilla JavaScript. The library is MIT licensed and can be added through npm, pnpm, yarn, or bun.

What is Cobe Js

Cobe Js is a lightweight globe visualization library built on WebGL. It is designed to draw a 3D globe on a canvas and let you animate it, rotate it, and layer data-driven elements on top of it. The project describes itself as a 5KB globe lib, which makes it a small client-side visualization option for developers who want an atmospheric world map effect without a large dependency.

The library is published as cobe and exposes a createGlobe(canvas, options) API. It returns an object with update() and destroy() methods, so it fits common lifecycle patterns in frontend apps. The site also shows usage examples for frameworks such as React, Vue, and Svelte, plus vanilla JavaScript.

Key features

Cobe Js focuses on a narrow set of globe-rendering capabilities rather than a broad charting suite. The source material shows these core features:

  • WebGL-based globe rendering in a very small package size.
  • Support for canvas sizing, including retina-friendly dimensions using width * 2 and height * 2.
  • Rotation controls through phi and theta values in radians.
  • Visual styling options such as dark, diffuse, mapSamples, mapBrightness, baseColor, markerColor, glowColor, arcColor, arcWidth, and arcHeight.
  • Marker support for plotting named locations with latitude and longitude.
  • Arc support for drawing routes between places, such as SF to Tokyo or NYC to London.
  • Animation support through repeated calls to update() inside requestAnimationFrame().
  • Framework compatibility across React, Vue, Svelte, and vanilla JS.

The examples on the site show a globe with city labels like San Francisco, New York, Tokyo, London, Sydney, Cape Town, Dubai, Paris, and São Paulo, plus interaction-themed presets such as Flights, Interactive, Analytics, Pulse, Weather, and Bars.

How to use it

Using Cobe Js starts with creating a canvas and passing it to createGlobe().

  1. Install the package with your preferred package manager, such as npm, pnpm, yarn, or bun.
  2. Import createGlobe from cobe.
  3. Pass a canvas element and an options object with required values like width, height, phi, and theta.
  4. Set style and data options such as mapSamples, mapBrightness, markers, and arcs to match your design.
  5. Keep the globe moving by updating phi or other properties inside an animation loop.
  6. Call destroy() when the canvas is removed so the instance can clean up correctly.

A typical setup can be used for a rotating hero globe, a route animation, or a location-based dashboard visual. The site’s sample code shows a globe configured with a 600 x 600 base size doubled for device pixel ratio, along with markers for San Francisco and New York and an arc between them.

Who it is for

Cobe Js is a good fit for frontend developers, design-minded engineers, and teams building data-rich landing pages. It is especially useful when you need an animated globe component rather than a full geospatial platform.

It may suit:

  • React, Vue, or Svelte developers who want a reusable globe widget.
  • Teams building marketing pages that need a polished world-map visual.
  • Product designers and developers creating location storytelling, travel paths, or network coverage displays.
  • Engineers who want a small dependency and a canvas-based rendering approach.
  • Developers who prefer MIT-licensed open source software with a straightforward API.

What to know before you use it

Cobe Js is a globe renderer, not a full mapping stack. It draws an interactive 3D world view and exposes configuration options, but the source material does not show routing, geocoding, tile loading, or a broader GIS workflow. If you need those capabilities, you should use a dedicated maps or geospatial service instead.

There are also some practical limits to keep in mind:

  • The documented API centers on a canvas element and numeric options, so you should be comfortable working close to the rendering layer.
  • The site shows multiple presets and samples, but it does not provide exhaustive reference material in the harvested text, so some advanced behavior may require reading the GitHub repository or package docs.
  • Accuracy depends on the data you pass in for markers, arcs, and coordinates; the library renders what you provide and does not validate business meaning.
  • The project is presented as free and MIT licensed on the site, but exact distribution details should still be confirmed in the repository or package metadata before commercial use.
  • If you need authoritative package information, version history, or licensing text, check npm or GitHub rather than relying only on the marketing site.

Cobe Js is best treated as a compact WebGL globe component for visuals, demos, and lightweight dashboards. For deeper geospatial analysis or map infrastructure, an official mapping source remains the safer choice.

FAQ

Is Cobe Js free to use?

Yes, Cobe Js is presented as free and MIT licensed. The harvested site material also points to the open-source package `cobe`, but you should still verify the license text in the repository before shipping commercially.

Which frameworks does Cobe Js support?

It works with React, Vue, Svelte, and vanilla JavaScript. The examples and copy on the site explicitly mention those four options.

Does Cobe Js work with a plain canvas element?

Yes, the main API is `createGlobe(canvas, options)`, so a canvas element is the core integration point. The returned globe instance also exposes `update()` and `destroy()`.

Can I show routes or markers on the globe?

Yes, the library supports both markers and arcs. The sample configuration includes city markers and an arc from San Francisco to New York.

Is Cobe Js a full map platform?

No, it is a globe visualization library rather than a complete GIS or routing platform. If you need geocoding, map tiles, or navigation services, use a dedicated mapping API instead.

cobe-js
Pricing
Free
CategoryDesign
PlatformWeb, API
LaunchedAug 2026
Updated2 months ago
Verified2 months ago
Tags
#3d#react#globe#webgl#canvas#open source#vue#svelte
Cobe Js logo
Cobe Js
Dir Hub

A curated directory of small, well-made apps. Browse by category or search to find the right one in fewer clicks.

Discover

  • Home
  • Pricing
  • Submit your app

Company

  • About
  • Contact

Legal

  • Privacy
  • Terms
© 2026 Dir HubCurated indie apps