[go: up one dir, main page]

@omnity/widget
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

Omnity Widget

The Omnity Widget is a simple way to embed Omnity into your website. It is a simple JavaScript file that you can include in your website to display Omnity content.

Usage

To use the Omnity Widget, you need to include the following script tag in your website:

npm install @omnity/widget

Then, you can use the following code to display Omnity content:

import { OmnityWidget, ChainID } from "@omnity/widget";

export default function MyComponent() {
  return (
    <OmnityWidget
      sourceChain={ChainID.Bitcoin}
      targetChain={ChainID.ICP}
      tokenIds={["Bitcoin-runes-PURPLE•MONKE•DISHWASHER"]}
      reversible
    />
  );
}

Configuration

The Omnity Widget accepts the following props:

Props Description Type
SourceChain Source chain ChainID, optional
targetChain Target chain ChainID, optional
tokenIds token ids to bridge string[], optional
reversible bridge from target chain to source chain bool, default false
colorMode interface color mode system, light or dark
width widget width number, optional, default 464
enum ChainID {
  ICP = "eICP",
  Bitcoin = "Bitcoin",
}

Package Sidebar

Install

npm i @omnity/widget

Weekly Downloads

2

Version

1.3.1

License

ISC

Unpacked Size

862 kB

Total Files

203

Last publish

Collaborators

  • omnity-team