New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@globestudio/element

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@globestudio/element

Framework-agnostic <globe-studio> web component for embedding Globestudio dotted globes in plain HTML, Svelte, Vue, Solid, Astro, Webflow or Framer.

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
221
151.14%
Maintainers
1
Weekly downloads
 
Created
Source

@globestudio/element

Framework-agnostic <globe-studio> web component for embedding Globestudio dotted globes. It has no dependencies. It's a small wrapper over globestudio.app/embed, so Three.js, shaders and country data all run on the embed origin.

It works anywhere custom elements do, including plain HTML, Svelte, Vue, Solid, Astro, Webflow and Framer.

Install

npm install @globestudio/element

Usage

import "@globestudio/element"; // auto-registers <globe-studio>
<!-- Pick a preset -->
<globe-studio look="aurora" width="800" height="600"></globe-studio>

<!-- From a share config (the ?c= payload from the app's Share tab) -->
<globe-studio config="…" height="480"></globe-studio>

<!-- On a light page -->
<globe-studio look="wireframe" theme="light"></globe-studio>

<!-- Halftone, Toon and Threshold paint a dark page, so make them see-through too -->
<globe-studio look="halftone" theme="light" config='{"backgroundStyle":"transparent"}'></globe-studio>

Or via CDN, no build step:

<script type="module" src="https://esm.sh/@globestudio/element"></script>
<globe-studio look="halftone"></globe-studio>

Attributes

AttributeDefaultNotes
lookhalftoneAny shipped preset id. With config, the config is layered over it.
configPre-built share config (?c= payload), layered over look, or over Default without one. A whole share link, or its ?c= query, works too.
themedarklight suits a light page: the glow and grid switch to a palette for light pages, and the white ink of Halftone, Wireframe, Toon and Threshold turns graphite. Halftone, Toon and Threshold paint a dark page of their own, so make them see-through in config too. Other values are ignored.
width100%Forwarded to the iframe.
height480Forwarded to the iframe.
titleGlobestudio dotted globeAccessible label.
loadinglazylazy defers off-screen embeds.
sourceAnalytics attribution tag.

Attributes are reactive: change look, config or theme and the globe updates.

In the app, the export dialog's Share tab writes this tag for the design on screen: pick Web component under Embed code and copy it.

API

import { defineGlobeStudio, buildEmbedUrl } from "@globestudio/element";

defineGlobeStudio("my-globe"); // register under a custom tag
buildEmbedUrl({ look: "vapor" }); // → "https://globestudio.app/embed?look=vapor"
buildEmbedUrl({ look: "vapor", theme: "light" }); // → "https://globestudio.app/embed?look=vapor&theme=light"

MIT © Globestudio

Keywords

web-component

FAQs

Package last updated on 05 Oct 2026

Related posts