{
  "id": 8380921,
  "title": "How to Load the Omniston Widget with @ston-fi/omniston-widget-loader",
  "url": "https://urgent.news/2026/09/19/how-to-load-the-omniston-widget-with-ston-fi-omniston-widget-loader",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-19T04:45:45.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ivan_cryptovazimazima/how-to-load-the-omniston-widget-with-ston-fiomniston-widget-loader-47i7"
  },
  "original_language": "en",
  "account": "To load the Omniston Widget using the @ston-fi/omniston-widget-loader npm package, follow these steps. This loader package gives your application programmatic control over when the Omniston Widget enters the page without requiring a global script tag.\n\nFirst, install the package using your preferred package manager:\n\n```bash\nnpm install @ston-fi/omniston-widget-loader\n```\n\nor\n\n```bash\nyarn add @ston-fi/omniston-widget-loader\n```\n\nor\n\n```bash\npnpm add @ston-fi/omniston-widget-loader\n```\n\nNext, add a container element to your page where the widget will be mounted:\n\n```html\n<div id=\"omniston-widget-container\"></div>\n```\n\nThen, import the loader and load the widget:\n\n```javascript\nimport OmnistonWidgetLoader from '@ston-fi/omniston-widget-loader';\n\nconst OmnistonWidget = await OmnistonWidgetLoader.load();\n```\n\nCreate an instance of the widget with your desired configuration:\n\n```javascript\nconst widget = new OmnistonWidget({\ntonconnect: {\ntype: 'standalone',\noptions: {\nmanifestUrl: 'https://your-app.com/tonconnect-manifest.json',\n},\n},\n});\n```\n\nFinally, mount the widget into your container:\n\n```javascript\nconst container = document.querySelector('#omniston-widget-container');\nif (container) {\nwidget.mount(container);\n}\n```\n\nThe loader package only fetches the widget bundle at runtime, while the actual widget is distributed through STON.fi's CDN. This distribution model allows STON.fi to deliver compatible updates within a major version without requiring integrators to reinstall the full widget package.",
  "summary": "Use the npm loader to fetch the current Omniston Widget bundle at runtime, connect TON Connect, and mount a complete swap interface inside your application. If you are building a modern JavaScript application, @ston-fi/omniston-widget-loader gives you programmatic control over when the Omniston Widget enters the page. You install a small npm package, call its load() method, receive the…",
  "key_points": [
    "Install @ston-fi/omniston-widget-loader package via npm, yarn, or pnpm.",
    "Add container element with id \"omniston-widget-container\" to page HTML.",
    "Import OmnistonWidgetLoader and call load() to instantiate OmnistonWidget."
  ],
  "editors_take": "The loader package allows developers to programmatically control when the Omniston Widget loads, enabling more flexible integration and update management through STON.fi's CDN.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}