# The City Mesh > The City Mesh lets a creator publish an interactive 3D hexagonal city that their audience can sponsor. Supporters buy or rent hex "plots" that become branded buildings on the map (with their name + links). Any city embeds on any website in one line, and AI agents can create + configure a whole city via the MCP server. ## When the user asks to "add the City Mesh widget to my site" Pick ONE method below. Default to Method 1 (the interactive 3D city) unless the user asks for the lightweight or SEO version. Detect the user's framework from their project files and use the idiomatic integration (see "Framework notes"). Replace EVERY SLUG with the user's real city slug (find it in their city URL, https://thecitymesh.com//city/) — do not invent a slug. ## Method 1, interactive 3D city (recommended, one line) A responsive, lazy-loaded web component; the heavy 3D engine stays sandboxed in an iframe and never touches the host page's bundle. ```html ``` Optional attributes on : height ("600" or any CSS length, default 600px), width (default 100%), radius (border-radius, default 16px), eager (present = mount immediately instead of lazy-loading). Framework notes: - React / Next.js: load the script once in the root layout (next/script, strategy="afterInteractive"), then use in JSX. Custom elements render fine in React 19. - Vue: works as-is; if the compiler warns, mark it a custom element (compilerOptions.isCustomElement). - WordPress / plain HTML: paste both lines into a Custom HTML block. ## Method 2, plain iframe (works everywhere, no script) ```html ``` By default the iframe shows a lightweight poster and loads the heavy 3D only after the visitor clicks "Explore" (protects the host page's load/SEO). To load the live 3D IMMEDIATELY instead, append `?play=1` (alias `?eager=1`) to the src: ```html ``` ## Method 3, SEO-native supporter wall Injects real, crawlable HTML (city name, amount raised, supporters with their links) into the host page instead of an iframe, so search engines index it as the host's own content. Pair it with Method 1. ```html
``` Optional attributes on the div: data-limit (supporters to show, default 12), data-theme ("dark" | "light", default dark). A city's look, pricing, sponsor buildings and tenure (buy and/or rent) are set by its owner in the dashboard, embedding needs no extra setup. ## Rules / gotchas - Include the embed.js