Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Widget

Embed Omniston-powered TON swaps with minimal configuration, collect integrator fees, and customize the experience.

The STON.fi Widget adds a swap interface for the TON blockchain to your application or website with minimal configuration. Powered by Omniston, it handles wallet connection, quotes, and swap execution. You can collect integrator fees, choose available assets and the initial trading pair, and customize the appearance to match your product.

STON.fi swap widget

The widget provides:

  • Complete swap flow: wallet balances, quotes, transaction signing, and trade-status tracking in a ready-made interface.

  • Flexible wallet integration: manage TON Connect automatically or share your application's existing wallet connection.

  • Optional fee collection: collect integrator fees on trades through your widget.

  • Optional asset configuration: use STON.fi's curated asset selection, extend it with custom assets, or offer a specific trading pair.

  • Visual customization: adapt themes, colors, component styles, and layout to match your product.

Start integrating

Follow Installation to load the widget through the CDN script or npm loader and mount it in your application. The guide also covers lifecycle events and cleanup when you remove the widget.

Integration examples

The public Omniston Widget repository contains open-source integration examples you can use as a reference:

  • Vanilla JavaScript: integrate the widget without a UI framework.

  • React: integrate the widget into a React application.

Visual constructor

Use the visual constructor as a playground to try the widget or as a configuration UI for your integration. Preview your changes as you configure the widget.

STON.fi Widget visual constructor

The constructor provides:

  • Theme customization: configure light and dark themes, colors, spacing, borders, and widths.

  • Asset selection: use the default assets, add custom assets, or define your own list and initial trading pair.

  • Integrator fees: set the fee recipient and rate.

  • Code export: copy the generated CSS and JavaScript configuration or a complete HTML example into your project.

Last updated