← Hub API & Embed Mode
v10.0
01 API & Embed Overview Pull GFS components into any tool

The GFS Design System is deployed as a static site on Cloudflare Pages. There is no traditional REST API backend, but every component is available via direct URL. This page documents three approaches for pulling design system components into other GFS tools: suitelets, dashboards, internal apps, and standalone HTML builds.

3 Embed Methods 10 Ready-Made Embeds 5 CDN Assets 7 Sections
Base URL: https://gfs-design-v9.pages.dev/
Source of truth: shared.css + tokens.json
Deploy target: Cloudflare Pages (auto-deploy on push)
CORS: Same-origin by default. Use iframe for cross-origin embeds.
■ All URLs reference the live Cloudflare Pages deployment.
02 Embed Methods Three approaches for pulling components

Choose the approach that fits your context. Each has tradeoffs around isolation, styling control, and setup complexity.

iframe iframe Embed

Embed a full GFS page or a specific section by targeting a hash fragment. The iframe provides complete style isolation -- the host page's CSS cannot interfere with GFS components.

HTML
<!-- Embed the color palette section from snippets -->
<iframe
  src="https://gfs-design-v9.pages.dev/snippets.html#s-colors"
  width="100%"
  height="400"
  style="border:1px solid #D9E1EA;"
  loading="lazy"
  title="GFS Color Palette"
></iframe>

<!-- Embed the full components page -->
<iframe
  src="https://gfs-design-v9.pages.dev/components.html"
  width="100%"
  height="800"
  style="border:none;"
  loading="lazy"
  title="GFS Components"
></iframe>
Advantages
  • Complete style isolation
  • Zero setup -- one line of HTML
  • Always shows latest deploy
  • Works cross-origin
Tradeoffs
  • No CSS customization from host
  • Fixed height (no auto-resize without JS)
  • Heavier page weight
  • Scrollbar inside frame
Auto-resize tip: Add this to the host page to auto-size the iframe:
window.addEventListener('message', e => { if(e.data.gfsHeight) document.getElementById('gfs-frame').style.height = e.data.gfsHeight + 'px'; });
fetch Fetch + Inject

Fetch a GFS page, extract a specific section by ID, and inject it into a target element. Requires the host page to load shared.css for proper styling. Best for same-origin tools or tools you control.

JS
/**
 * Pull a GFS section into the current page.
 * Requires: <link rel="stylesheet" href="https://gfs-design-v9.pages.dev/shared.css">
 */
async function gfsEmbed(targetSelector, sourceUrl, sectionId) {
  const res  = await fetch(sourceUrl);
  const html = await res.text();
  const doc  = new DOMParser().parseFromString(html, 'text/html');
  const sec  = doc.getElementById(sectionId);
  if (sec) {
    const target = document.querySelector(targetSelector);
    // Clear and append extracted section safely
    while (target.firstChild) target.removeChild(target.firstChild);
    const imported = document.importNode(sec, true);
    target.appendChild(imported);
  } else {
    console.warn('[GFS] Section not found:', sectionId);
  }
}

// Usage:
gfsEmbed(
  '#my-container',
  'https://gfs-design-v9.pages.dev/snippets.html',
  's-colors'
);
Advantages
  • Full CSS control from host
  • No iframe overhead
  • Can manipulate injected DOM
  • Smooth integration with host layout
Tradeoffs
  • Host must load shared.css
  • Same-origin or CORS required
  • Host CSS can conflict
  • JS setup required
copy Copy-Paste from Snippets

Open snippets.html and copy any component's HTML directly. This is the simplest approach for one-off builds where you want full control and no external dependencies at runtime.

WORKFLOW
1. Open https://gfs-design-v9.pages.dev/snippets.html
2. Find the component you need (buttons, badges, tables, etc.)
3. Click [COPY] on the snippet card
4. Paste into your HTML file
5. Ensure shared.css is loaded, or inline the relevant CSS variables
Advantages
  • Zero runtime dependency possible
  • Works anywhere HTML works
  • Can inline styles for email/PDF
  • No fetch, no iframe, no JS
Tradeoffs
  • Manual -- does not auto-update
  • Must check for design system changes
  • Copy drift if system evolves
■ For NetSuite suitelets, the fetch+inject method works best inside SuiteScript 2.0 HTML renders.
03 Component API Explorer Interactive component picker with embed output

Select a component type and variant below. The explorer generates a live preview and three output formats you can copy directly.

HTML
iframe Embed
Fetch + Inject
<button class="btn btn-primary">Primary Action</button>
■ The explorer generates code against the live Cloudflare Pages URL. Adjust the base URL if running locally.
04 Ready-Made Embeds 10 pre-built embed codes for common use cases

Copy-ready HTML for the ten most commonly embedded GFS components. Each includes a live preview and the code to reproduce it.

01 Color Palette Strip
Cobalt
#092F64
Navy
#1A5799
Tufts
#468BE6
Jordy
#93BFEF
Alice
#E9F5FF
Ice
#F4F9FF
<div style="display:flex;gap:4px;">
  <div style="flex:1;height:48px;background:#092F64;"></div>
  <div style="flex:1;height:48px;background:#1A5799;"></div>
  <div style="flex:1;height:48px;background:#468BE6;"></div>
  <div style="flex:1;height:48px;background:#93BFEF;"></div>
  <div style="flex:1;height:48px;background:#E9F5FF;border:1px solid #D9E1EA;"></div>
  <div style="flex:1;height:48px;background:#F4F9FF;border:1px solid #D9E1EA;"></div>
</div>
02 Primary Button Set
<!-- Requires shared.css -->
<button class="btn btn-primary">Confirm Order</button>
<button class="btn btn-secondary">Cancel</button>
<button class="btn btn-ghost">Reset</button>
03 Address Block (HQ + PA)
Headquarters
Global Food Solutions, Inc.
131 Heartland Blvd
Edgewood, NY 11717
(877) 728-5550
Facility 2
Global Food Solutions, Inc.
2500 Freeland Road
Hermitage, PA 16148
<div style="display:grid;grid-template-columns:1fr 1fr;gap:16px;">
  <div style="border:1px solid #D9E1EA;padding:16px;">
    <div style="font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#468BE6;font-weight:600;margin-bottom:8px;">Headquarters</div>
    <div style="font-size:13px;color:#1F1F1F;line-height:1.7;">
      <strong>Global Food Solutions, Inc.</strong><br>
      131 Heartland Blvd<br>Edgewood, NY 11717<br>
      <span style="font-family:'IBM Plex Mono',monospace;font-size:11px;color:#6B7280;">(877) 728-5550</span>
    </div>
  </div>
  <div style="border:1px solid #D9E1EA;padding:16px;">
    <div style="font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#468BE6;font-weight:600;margin-bottom:8px;">Facility 2</div>
    <div style="font-size:13px;color:#1F1F1F;line-height:1.7;">
      <strong>Global Food Solutions, Inc.</strong><br>
      2500 Freeland Road<br>Hermitage, PA 16148
    </div>
  </div>
</div>
04 Status Badge Set
In Transit Delivered Pending Alert
<!-- Requires shared.css -->
<span class="badge badge-blue">In Transit</span>
<span class="badge badge-green">Delivered</span>
<span class="badge badge-yellow">Pending</span>
<span class="badge badge-red">Alert</span>
05 KPI Card
Revenue MTD
$1.24M
+12.4% vs prior month
<div style="border:1px solid #D9E1EA;padding:20px;">
  <div style="font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#6B7280;margin-bottom:8px;">Revenue MTD</div>
  <div style="font-size:32px;font-weight:800;color:#092F64;line-height:1.1;">$1.24M</div>
  <div style="font-family:'IBM Plex Mono',monospace;font-size:11px;color:#0F766E;margin-top:8px;">+12.4% vs prior month</div>
</div>
06 Data Table Template
PO #VendorAmountStatus
PO-2841Bongards$42,180Received
PO-2842Dairy Farmers$18,650In Transit
PO-2843Leprino Foods$67,320Pending
<!-- Requires shared.css for .demo-table and .badge classes -->
<table class="demo-table" style="width:100%;">
  <thead>
    <tr><th>PO #</th><th>Vendor</th><th>Amount</th><th>Status</th></tr>
  </thead>
  <tbody>
    <tr><td>PO-2841</td><td>Bongards</td><td>$42,180</td><td><span class="badge badge-green">Received</span></td></tr>
    <tr><td>PO-2842</td><td>Dairy Farmers</td><td>$18,650</td><td><span class="badge badge-blue">In Transit</span></td></tr>
  </tbody>
</table>
07 Frosty Avatar
Pick an expression
<div style="width:56px;height:56px;border-radius:50%;background:#E9F5FF;border:2px solid #93BFEF;display:flex;align-items:center;justify-content:center;font-size:28px;">&#10052;</div>

<!-- For the full interactive Frosty, embed the page: -->
<iframe src="https://gfs-design-v9.pages.dev/frosty.html" width="100%" height="500" style="border:none;"></iframe>
08 Navigation Breadcrumb
<nav style="font-family:'IBM Plex Mono',monospace;font-size:11px;color:#6B7280;letter-spacing:.04em;">
  <a href="index.html" style="color:#468BE6;text-decoration:none;">Hub</a>
  <span style="margin:0 8px;opacity:.4;">/</span>
  <a href="procurement.html" style="color:#468BE6;text-decoration:none;">Operations</a>
  <span style="margin:0 8px;opacity:.4;">/</span>
  <span style="color:#092F64;font-weight:600;">Current Page</span>
</nav>
09 Footer Block
GFS Design System v10.0 · Global Food Solutions, Inc. · 131 Heartland Blvd, Edgewood, NY 11717
<div style="text-align:center;padding:20px;font-family:'IBM Plex Mono',monospace;font-size:11px;color:#6B7280;border-top:1px solid #D9E1EA;">
  GFS Design System v10.0 &middot; Global Food Solutions, Inc. &middot; 131 Heartland Blvd, Edgewood, NY 11717
</div>
10 Nutrition Facts Panel
Nutrition Facts
Serving Size 1 oz (28g)
Calories110
Total Fat9g
Protein7g
Calcium20%
<!-- FDA Nutrition Facts mini panel -- see nutritionals.html for full 21 CFR 101.9 compliant version -->
<iframe src="https://gfs-design-v9.pages.dev/nutritionals.html#s-standard-vertical" width="320" height="600" style="border:1px solid #D9E1EA;"></iframe>
■ All embed codes use hardcoded hex values for portability. Use CSS variables (var(--cobalt), etc.) when shared.css is loaded.
05 NetSuite Integration GFS components in SuiteScript 2.0 suitelets

NetSuite suitelets render HTML inside a sandboxed environment. The following patterns let you inject GFS brand components directly into suitelet output.

Step 1 — Inject shared.css via SuiteScript 2.0
JS
/**
 * @NApiVersion 2.1
 * @NScriptType Suitelet
 */
define(['N/ui/serverWidget'], function(serverWidget) {

  function onRequest(context) {
    var form = serverWidget.createForm({ title: 'GFS Branded Suitelet' });

    var htmlField = form.addField({
      id: 'custpage_gfs_html',
      type: serverWidget.FieldType.INLINEHTML,
      label: 'GFS Content'
    });

    htmlField.defaultValue = getGfsHtml();
    context.response.writePage(form);
  }

  function getGfsHtml() {
    return [
      '<link rel="preconnect" href="https://fonts.googleapis.com">',
      '<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&family=Inter:wght@400;600;700;800&display=swap" rel="stylesheet">',
      '<link rel="stylesheet" href="https://gfs-design-v9.pages.dev/shared.css">',
      '<style>',
      '  /* Override NetSuite sandbox defaults */',
      '  .gfs-suitelet { font-family: "Inter", sans-serif; color: #1F1F1F; }',
      '  .gfs-suitelet * { box-sizing: border-box; }',
      '</style>',
      '<div class="gfs-suitelet">',
      '  <!-- Your GFS content here -->',
      '</div>'
    ].join('\n');
  }

  return { onRequest: onRequest };
});
Step 2 — GFS Buttons and Badges in Suitelet HTML
HTML
<div class="gfs-suitelet">
  <!-- GFS buttons work directly once shared.css is loaded -->
  <button class="btn btn-primary" onclick="approveRecord()">Approve PO</button>
  <button class="btn btn-secondary" onclick="history.back()">Back to List</button>

  <!-- Status badges -->
  <span class="badge badge-green">Approved</span>
  <span class="badge badge-yellow">Pending Review</span>
  <span class="badge badge-red">Rejected</span>

  <!-- Data table -->
  <table class="demo-table" style="width:100%;margin-top:16px;">
    <thead><tr><th>Item</th><th>Qty</th><th>Rate</th><th>Amount</th></tr></thead>
    <tbody>
      <tr><td>Barrel Cheddar</td><td>40,000 lbs</td><td>$1.8450</td><td>$73,800</td></tr>
    </tbody>
  </table>
</div>
Step 3 — Complete Branded Suitelet Template
HTML
<!-- Full branded suitelet page wrapper -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&family=Inter:wght@400;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://gfs-design-v9.pages.dev/shared.css">
<style>
  .gfs-suitelet { font-family:'Inter',sans-serif; color:#1F1F1F; max-width:1200px; margin:0 auto; padding:24px; }
  .gfs-suitelet * { box-sizing:border-box; margin:0; padding:0; }
  .gfs-suitelet .ns-header { background:#092F64; color:#fff; padding:16px 24px; display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; }
  .gfs-suitelet .ns-header h1 { font-size:15px; font-weight:700; letter-spacing:.04em; }
  .gfs-suitelet .ns-header .ns-meta { font-family:'IBM Plex Mono',monospace; font-size:10px; opacity:.7; letter-spacing:.06em; text-transform:uppercase; }
</style>

<div class="gfs-suitelet">
  <div class="ns-header">
    <h1>Global Food Solutions</h1>
    <span class="ns-meta">Suitelet v1.0</span>
  </div>

  <div class="s">
    <div class="s-head">
      <span class="s-num">01</span>
      <span class="s-title">Purchase Order Review</span>
      <span class="s-meta">Approval Queue</span>
    </div>
    <div class="s-body" style="padding:24px;">
      <!-- Your suitelet content here -->
    </div>
  </div>
</div>
Step 4 — CSS Compatibility Within NetSuite's Sandbox

NetSuite's INLINEHTML fields strip some CSS features. These patterns are confirmed to work:

Confirmed working: font-family, font-size, color, background, border, padding, margin, display:flex, display:grid, gap, text-transform, letter-spacing, border-radius, opacity, max-width, min-height

Avoid in suitelets: position:fixed, position:sticky, CSS animations (@keyframes), backdrop-filter, ::before/::after pseudo-elements (inconsistent), CSS variables in older NS versions

Workaround: Replace CSS variables with hardcoded hex values if targeting older NetSuite environments. Use the embed codes from Section 04 which include inline hex fallbacks.
Preview — Branded Suitelet Mockup
Global Food Solutions Suitelet
Global Food Solutions PO Approval Queue
PO #VendorAmountStatusAction
PO-2841Bongards$42,180Pending
PO-2842Dairy Farmers$18,650Approved
■ For advanced NetSuite mockups and portal templates, see netsuite.html (21 mockups).
06 CDN Asset URLs All externally-referenceable assets

Every asset is served from the Cloudflare Pages edge. Use these URLs in any external tool, suitelet, or HTML build.

Asset URL Type Purpose
shared.css https://gfs-design-v9.pages.dev/shared.css CSS Complete design tokens, component styles, brand DNA
print.css https://gfs-design-v9.pages.dev/print.css CSS Print overrides (hides topbar, forces white bg)
favicon.svg https://gfs-design-v9.pages.dev/favicon.svg SVG GFS favicon for browser tabs
tokens.json https://gfs-design-v9.pages.dev/tokens.json JSON Machine-readable design tokens (colors, spacing, typography)
analytics.js https://gfs-design-v9.pages.dev/analytics.js JS Cloudflare Web Analytics beacon
Usage Examples
HTML
<!-- Load the complete GFS design system in any HTML page -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&family=Inter:opsz,wght@14..32,100..900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://gfs-design-v9.pages.dev/shared.css">
<link rel="stylesheet" href="https://gfs-design-v9.pages.dev/print.css" media="print">
<link rel="icon" href="https://gfs-design-v9.pages.dev/favicon.svg" type="image/svg+xml">
JS
// Fetch tokens programmatically for build tooling
fetch('https://gfs-design-v9.pages.dev/tokens.json')
  .then(r => r.json())
  .then(tokens => {
    console.log('GFS Cobalt:', tokens.colors.primary.cobalt.value);
    console.log('GFS Font:', tokens.typography.display.family);
    console.log('Version:', tokens.version);
  });
Tip: For builds that cannot reach the CDN at runtime (e.g., offline PDF exports), download shared.css locally and bundle it. The CSS is self-contained -- all tokens are defined in :root with no external dependencies beyond Google Fonts.
■ All assets are served with Cloudflare edge caching. Response times are typically under 50ms globally.
07 Versioning & Cache Cloudflare Pages caching, cache busting, deploy pinning

Understanding how Cloudflare Pages handles caching is critical when embedding GFS components in production tools.

Cloudflare Pages Caching Behavior
Default behavior: Cloudflare Pages serves assets with Cache-Control: public, max-age=0, must-revalidate. This means browsers will always revalidate with the edge on each request, but the edge serves cached content instantly via ETag/If-None-Match.

Result: Every page load checks for the latest version. If unchanged, Cloudflare returns 304 (not modified) in under 50ms. If a new deploy happened, the new version is served immediately.

Edge locations: 300+ Cloudflare PoPs worldwide. First request from a new PoP may take ~200ms; subsequent requests are served from edge cache.
Cache Busting

Every new deploy to Cloudflare Pages generates a new content hash. There is no manual cache purge needed.

HTML
<!-- Option 1: Always latest (default -- no query string needed) -->
<link rel="stylesheet" href="https://gfs-design-v9.pages.dev/shared.css">

<!-- Option 2: Force bypass browser cache with a deploy timestamp -->
<link rel="stylesheet" href="https://gfs-design-v9.pages.dev/shared.css?v=20260518">

<!-- Option 3: Pin to a specific deploy hash (immutable) -->
<link rel="stylesheet" href="https://abc123.gfs-design-v9.pages.dev/shared.css">
Pinning to a Specific Deploy

Cloudflare Pages assigns a unique subdomain to each deploy. Use this to pin a production tool to a known-good version while testing newer versions separately.

TEXT
Production URL (always latest):
  https://gfs-design-v9.pages.dev/shared.css

Deploy-pinned URL (immutable snapshot):
  https://<commit-hash>.gfs-design-v9.pages.dev/shared.css

Branch preview URL:
  https://<branch-name>.gfs-design-v9.pages.dev/shared.css

Example: Pin suitelets to a tested deploy
  https://a1b2c3d.gfs-design-v9.pages.dev/shared.css
Recommendation for NetSuite suitelets: Use the production URL (always latest) during development. Before going live, pin to a specific deploy hash. Update the hash after testing each design system release.

Recommendation for dashboards: Use the production URL. Dashboards should always reflect the latest brand assets. The must-revalidate cache policy ensures updates are visible within seconds of deploy.

Recommendation for PDFs/exports: Inline the CSS. Do not depend on a remote URL for assets that must render offline.
Version History
VersionDateBreaking Changes
v10.0May 2026New token system, dark mode, 72 pages. Full rewrite from v8.
v8.x2025Legacy. Do not use for new builds.
■ See changelog.html for the full version history and migration guide.
← Back to Hub · GFS Design System v10.0 · Global Food Solutions, Inc. · 131 Heartland Blvd, Edgewood, NY 11717
Copied to clipboard