v1.6.x-dev NDS IQ v6

Document Head - National Design System

The stylesheets and scripts every NDS page loads so it paints fast, with no flash of unstyled content and no layout shift.

Page Setup

Put the assets and inline scripts in <head>, and the main bundle just before </body>. The ?ver= query is a cache-busting stamp: change it whenever a bundle changes.

<head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Page Title</title> <!-- Critical CSS — render-blocking, so first paint has the real tokens (no flash). --> <link rel="stylesheet" href="assets/css/nds.critical.min.css?ver=1.6.0"> <!-- Main CSS — deferred; loads the icon sheets once it applies. --> <link rel="preload" href="assets/css/nds-main.min.css?ver=1.6.0" as="style" onload="this.onload=null;this.rel='stylesheet';window.loadDeferredAssets?loadDeferredAssets():window.__ndsDeferredPending=true"> <noscript><link rel="stylesheet" href="assets/css/nds-main.min.css?ver=1.6.0"></noscript> <noscript><link rel="stylesheet" href="assets/css/nds-icons.min.css?ver=1.6.0"></noscript> <noscript><link rel="stylesheet" href="assets/css/hgi-rounded-stroke-min.css?ver=1.6.0"></noscript> <!-- Placeholder icon — replace with your own. --> <link rel="icon" type="image/svg+xml" href="assets/img/favicon.svg"> <!-- Inline scripts — theme guard (no light-to-dark flip) + loadDeferredAssets. Copy from the JavaScript tab. --> <script>/* theme guard + loadDeferredAssets — see the JavaScript tab */</script> </head> <!-- ...page content... then just before </body>: --> <script defer src="assets/js/nds-main.min.js?ver=1.6.0"></script>

The HTML tab loads critical CSS render-blocking — the simplest setup, and first paint already carries the real tokens so there's no flash. The inline gate is optional. For a non-blocking first paint (better FCP on slow networks), drop the inline <style> gate from the Critical Gate tab into <head> and swap the render-blocking critical <link> for the async version:

<link rel="preload" href="assets/css/nds.critical.min.css?ver=1.6.0" as="style" onload="this.onload=null;this.rel='stylesheet'"> <noscript><link rel="stylesheet" href="assets/css/nds.critical.min.css?ver=1.6.0"></noscript>

The gate hides above-the-fold chrome until styles land, so async loading never flashes.

Asset Files

What each bundle holds and how it loads.

FileContentsLoading
nds.critical.min.cssTokens, reset, fonts, hero, gateRender-blocking (or async behind the gate)
nds-main.min.cssAll component and layout stylesDeferred; gates the page reveal
nds-icons.min.cssUI icons (nds-icon)Loaded after main CSS
hgi-rounded-stroke-min.cssContent icon font (hgi hgi-stroke)Loaded after main CSS
nds-main.min.jsLoader and all component behavior<script defer> before </body>
Last Modified Date: 18/07/2026 - 03:05 AM
Was this page useful?
60% of users said Yes from 2843 Feedbacks