embed code

Basic embed

The minimum required code to embed the YAP widget:

<iframe
  src="https://widget.yaphub.xyz/token/CONTRACT_ADDRESS"
  width="380"
  height="600"
  frameborder="0"
></iframe>

<!-- YAP Anonymous Chat Widget -->
<!-- Docs: docs.yaphub.xyz -->
<iframe
  src="https://widget.yaphub.xyz/token/CONTRACT_ADDRESS"
  sandbox="allow-scripts allow-same-origin allow-popups"
  referrerpolicy="no-referrer"
  width="380"
  height="600"
  frameborder="0"
></iframe>

Sandbox attributes explained

Attribute
Purpose

allow-scripts

Allows JavaScript to run inside the widget

allow-same-origin

Allows the widget to use localStorage for anonymous identity

allow-popups

Allows external links (Helio payment, Axiom, etc.) to open

The following are intentionally not included:

Omitted
Why

allow-top-navigation

Widget cannot navigate your page

allow-forms

No form submissions to external services

allow-same-origin without scripts

Meaningless without scripts


With custom colours

See URL Parameters for all available colour options.


Responsive sizing

To make the widget fill its container responsively:


React / JSX


Vue

Was this helpful?