Socket Widget
Seamless bridging experience into a single fully customizable React Component
Socketβs Widget is a React component that can be easily imported in any React (JS/TS) project. The widget supports most features from Bungee.exchange. It brings the seamless bridging UX from Bungee to any DApp!
The widget requires provider
from userβs connected wallet & Socketβs API_KEY
as props to initialise. Optional props can be passed to customize the widgetβs color scheme, pre-select the chains/tokens & also customize token lists.
The full documentation for the widget can be found here
Installation
The widget can be installed via NPM or Yarn.
NPM :
npm install @socket.tech/widget
Yarn :
yarn add @socket.tech/widget
Note : The widget requires react
(>=17.0.1) and react-dom
(>=17.0.1) as peerDepencies.
Initialization
Copy the snippet below to get started! Pass the API_KEY
from a .env file and Provider
from userβs connected wallet.
import { Bridge } from "@socket.tech/widget";
import { Provider } from "./providerComponent"
function SocketBridge() {
return (
<Bridge
provider={Provider}
API_KEY={process.env.SOCKET_API_KEY}
/>
)
}
export default SocketBridge;
Thatβs it! Youβve successfully plugged your DApp into Socket!
Documentation
Example App
Work In Progress