Skip to content

Changes from Micrio 6.x to 7.0 Client 7.0

This page is about the Micrio client version 7. Use the links below to navigate to alternative versions.

If you are using Micrio out of the box (using it with no custom CSS or JS), upgrading to 7.0 is a drop-in replacement — your existing images, markers, tours, and embeds will continue to work without modifications.

If you have a customised implementation with your own CSS or JavaScript that targets Micrio's internals, the following changes apply.


Should I upgrade?

Each Micrio JavaScript major version has a stable working release:

This means projects using any of these versions will always keep working as they are. If your current implementation works well, there is no need to upgrade.


What's changed in v7?

1. Svelte has been removed — native Web Components

After the WebAssembly engine was removed in 6.0, the UI layer was still silo'd behind Svelte while the rest of the codebase ran on plain TypeScript. Version 7.0 completes this transition: Svelte is gone, and every piece of the Micrio UI is now a native custom element.

This eliminated ~200 kB of uncompiled code, unified the internal architecture, and makes the rendering and UI logic easier to follow and maintain.

The resulting download numbers reflect this:

6.1.14 (Svelte 5)7.0.0 (Web Components)Change
Lines of code25,81321,991−14.81%
Raw source code982.7 kB781.2 kB−20.50%
Compiled JS400.3 kB268.0 kB−33.05%
Over the wire (compressed)131.0 kB90.2 kB−31.15%

The HTML structure became much cleaner and more logical. The restructured CSS also gained a better overview, which resulted in a better mobile UI/UX and more unified styling across all elements.

2. DOM structure overhaul — classes became elements

Previously, Micrio rendered its UI as <div> elements with micrio- prefixed class names:

html
<!-- v6 / v5 — class-based DOM -->
<div class="micrio-toolbar">…</div>
<div class="micrio-controls">…</div>
<button class="micrio-button zoom-in">…</button>

In v7, every visual component is a proper HTML custom element with the same micrio- prefix:

html
<!-- v7 — custom element-based DOM -->
<micrio-toolbar>…</micrio-toolbar>
<micrio-controls>…</micrio-controls>
<micrio-button class="zoom-in"><button>…</button></micrio-button>

All components live inside a <micrio-main> wrapper which mainly uses display: contents.

3. Google Analytics integration removed

The built-in GoogleTag class and its automatic gtag.js event tracking has been removed. If you were relying on data-gtag or the noGTag setting, these are now no-ops.

You can achieve the same (and more flexible) analytics by listening to Micrio's custom events and forwarding them to your analytics provider yourself:

js
const micrio = document.querySelector('micr-io');

// Forward specific Micrio events to your analytics
micrio.addEventListener('load', (e) => {
	myAnalytics.track('Micrio Image Loaded', { id: e.detail.id });
});

micrio.addEventListener('marker-opened', (e) => {
	myAnalytics.track('Marker Opened', { title: e.detail.title });
});

micrio.addEventListener('tour-start', (e) => {
	myAnalytics.track('Tour Started', { id: e.detail.id });
});

4. Minor JS API changes

v6 / v5v7Impact
micrio.open(id) returns MicrioImagemicrio.open(id) returns Promise<MicrioImage> (async)Await the call or use .then()
micrio.open() accepts string | Partial<ImageInfo>accepts string | BundleImageRarely affects custom code

5. Consolidated data loading — bundle.json

Introduced in a later 6.x release but never documented, bundle.json is now the primary and only data endpoint for the Micrio viewer. It replaces the earlier two-file model (info.json + data.json / data.[lang].json) with a single consolidated response that contains everything the client needs:

// https://viewer.micr.io/{image-id}/bundle.json
{
  "images": [
    {
      "id": "abc1234",
      "info": { /* image metadata, dimensions, tiles */ },
      "data": { /* markers, tours, text — already language-resolved */ },
      "settings": { /* image-specific overrides */ }
    }
  ],
  "organisation": { /* org branding, logo */ },
  "spaces": [{ "id": "…", "data": { /* 360 space data */ } }],
  "album": { /* gallery/album config for multi-image sets */ }
}

Key benefits:

  • Single request — one HTTP call replaces multiple fetches, reducing load time.
  • Multi-image — albums, grids, and related images are all returned in a single images array, so switching between them requires no additional network requests.
  • Language-resolved data — the server delivers data already in the requested language (based on the lang attribute), no separate language fetches needed.
  • Self-contained — organisation branding, 360 spaces, and album configuration travel with the image data, so the client never needs secondary API calls.

As this is only for internal use, no action is required from your end for this change.


CSS migration guide

Changed selectors

If you wrote custom CSS that targeted Micrio's internal class names, you need to update your selectors to target the new custom elements:

Old selector (v6 / v5)New selector (v7)Notes
.micrio-buttonmicrio-button > :is(button, a)The <button> / <a> is now a child of <micrio-button>
.micrio-button.activemicrio-button > :is(button, a).activeActive state class is on the inner element
.micrio-iconmicrio-icon > svgSVG is a child of <micrio-icon>
.micrio-toolbarmicrio-toolbarDirect element selector
.micrio-controlsmicrio-controlsDirect element selector
.micrio-minimapmicrio-minimapDirect element selector
.micrio-gallerymicrio-galleryDirect element selector
.micrio-popupmicrio-marker-popupRenamed, now a proper element
.micrio-logomicrio-logoDirect element selector
.micrio-logo-orgmicrio-logo-orgDirect element selector
.micrio-detailsmicrio-detailsDirect element selector
.micrio-errormicrio-errorDirect element selector
.micrio-progressmicrio-progress-circleRenamed, now a proper element
.micrio-popovermicrio-popoverDirect element selector
.micrio-tourmicrio-tour or micrio-serial-tourSerial tours are a separate element
.micrio-mediamicrio-mediaDirect element selector
.micrio-subtitlesmicrio-subtitlesDirect element selector
.micrio-button-groupmicrio-button-groupDirect element selector
.micrio-gridmicrio-gridDirect element selector
.micrio-fullscreenmicrio-fullscreenDirect element selector
.micrio-embedmicrio-embedDirect element selector
.micrio-image-embedsmicrio-image-embedsDirect element selector
.micrio-zoom-buttonsmicrio-zoom-buttonsDirect element selector
.micrio-dialmicrio-dialDirect element selector
.micrio-audio-controllermicrio-audio-controllerNow a custom element
.micrio-waypointmicrio-waypointDirect element selector
.micrio-marker-contentmicrio-marker-contentDirect element selector
.micrio-media-controlsmicrio-media-controlsDirect element selector
.micrio-markers-containermicrio-markersRenamed
.micrio-markermicrio-markerDirect element selector

Example — before and after

Before (v6 / v5):

css
.micrio-button {
	background: red;
}
.micrio-toolbar {
	opacity: 0.5;
}

After (v7):

css
micrio-button > button {
	background: red;
}
micrio-toolbar {
	opacity: 0.5;
}

CSS variables

All existing CSS variables remain unchanged. They are defined on :root / html and apply globally — the same --micrio-* variables you're already using still work:

VariableDefaultDescription
--micrio-color#fffDefault text color
--micrio-color-hover#45A4E4Hover / active color
--micrio-border-radius4pxBorder radius for buttons, popups
--micrio-backgroundrgba(41,41,41,0.75)Element background
--micrio-background-filterblur(8px)Glass effect
--micrio-icon-size18pxIcon size
--micrio-text-alignleftText alignment
--micrio-line-height1.5emLine height
--micrio-border-margin16pxMargin from browser edge
--micrio-button-size48pxButton size
--micrio-button-shadow0 4px 8px rgba(0,0,0,.33)Button shadow
--micrio-marker-size16pxMarker size
--micrio-marker-text-color#fffMarker label text color
--micrio-marker-text-shadow0px 2px 4px rgba(0,0,0,0.6)Marker label shadow
--micrio-marker-highlight#00d4eeMarker highlight color
--micrio-marker-color#fffMarker color
--micrio-marker-border-radius100%Marker shape
--micrio-marker-border-colorrgba(255,255,255,.2)Marker border
--micrio-marker-border-size8pxMarker border width
--micrio-marker-iconnoneCustom marker icon
--micrio-marker-transitionbackground-color 0.25s ease, …Marker transition
--micrio-popup-shadow0 8px 16px rgba(0,0,0,.33)Popup shadow
--micrio-popup-padding16pxPopup padding
--micrio-progress-bar-backgroundrgba(255,255,255,.25)Progress bar track
--micrio-progress-bar-height4pxProgress bar height
--micrio-waypoint-size120pxWaypoint size

New variables in v7

VariableDefaultDescription
--micrio-hidenonePer-element hide transform (set per component)

Attribute-based state selectors

Micrio 7.0 introduces new state attributes on <micr-io> that you can use in your CSS:

css
/* New state attributes — v7 only */
micr-io[data-idle] { … }           /* No user activity for a period */
micr-io[data-zoomed] { … }         /* Camera is zoomed in past the initial view */
micr-io[data-tour-active] { … }    /* A tour is currently playing */

These were not available in v6.


Full element reference

ElementRole
<micrio-main>Root UI container (display: contents)
<micrio-button>Icon/text button
<micrio-icon>Inline SVG icon
<micrio-button-group>Grouped button bar
<micrio-dial>Rotary dial / knob control
<micrio-progress-circle>Loading spinner
<micrio-toolbar>Top toolbar
<micrio-controls>Bottom controls bar
<micrio-minimap>Interactive minimap
<micrio-logo>Micrio brand logo
<micrio-logo-org>Organisation logo
<micrio-details>Image info panel
<micrio-error>Error overlay
<micrio-markers>Marker container
<micrio-marker>Individual marker
<micrio-marker-popup>Marker popup
<micrio-marker-content>Marker content area
<micrio-popover>Custom page popover
<micrio-menu>Navigation menu
<micrio-tour>Video / marker tour UI
<micrio-serial-tour>Multi-image serial tour UI
<micrio-waypoint>Tour waypoint indicator
<micrio-media>Video / 360 video player
<micrio-media-controls>Media player controls
<micrio-subtitles>VTT subtitle overlay
<micrio-audio-controller>Positional audio controller
<micrio-gallery>Swipe / switch gallery UI
<micrio-grid>CSS grid layout container
<micrio-image-embeds>Embedded image containers
<micrio-embed>Individual embedded image
<micrio-fullscreen>Fullscreen toggle
<micrio-zoom-buttons>Zoom in/out buttons

How to update

bash
npm install @micrio/client@latest

Then import it in your project:

ts
import type { HTMLMicrioElement } from '@micrio/client';

const micrio = document.querySelector('micr-io') as HTMLMicrioElement;
micrio.camera.flyToView([.2,.2,.3,.3]);

If you are already using @micrio/client from npm:

bash
npm update @micrio/client

Via CDN (direct HTML <script> include)

Replace your Micrio JS reference with the latest version:

https://r2.micr.io/micrio-7.1.3.min.js

If your project uses TypeScript declarations:

https://r2.micr.io/micrio-7.1.3.min.d.ts


What stayed the same

  • The Micrio data model (markers, tours, embeds, settings) did not change. All images published in the dashboard work across v5, v6, and v7.
  • The main JS API (open(), close(), $current, camera, state, addEventListener) is still the same — only minor internal renames as noted above.
  • CSS variables (--micrio-*) are fully backwards compatible.
  • The <micr-io> element tag — your existing HTML <micr-io id="…"> markup needs no changes.