Skip to content

Global Definitions

Metro UI uses some global variables in its work. You can change them with meta tags in the head of your document.

NameTagDefaultDescription
init<meta name="metro:init">trueAuto initialization of the Metro UI library.
blur<meta name="metro:blur">falseBlur effect for images without alt attribute.
smooth<meta name="metro:smooth">trueSmooth scrolling for the page.
theme<meta name="metro:theme">undefinedTheme of the Metro UI library: auto, dark, light
info<meta name="metro:info">trueShow information about the Metro UI library in console.

You can use the following code to set up the global variables:

<meta name="metro:init" content="true">
<meta name="metro:blur" content="false">
<meta name="metro:smooth" content="true">
<meta name="metro:theme" content="auto">
<meta name="metro:info" content="true">

The init variable is used to initialize the Metro UI library. If set to true (default), the library will automatically initialize all components on the page. If set to false, you need to manually initialize components using JavaScript.

<meta name="metro:init" content="false">
$.ready(function() {
// Initialize components manually
Metro.init();
});