You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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](https://bungee.exchange/). It brings the seamless bridging UX from Bungee to any DApp!
20
+
Socket Plugin is a React component that can be easily imported in any React (JS/TS) project. The plugin supports most features from [Bungee.exchange](https://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](https://www.notion.so/Socket-Widget-Docs-b905871870e343c6833169ebbd356790) can be passed to customize the widget’s color scheme, pre-select the chains/tokens & also customize token lists.
24
+
The plugin requires `provider` from user’s connected wallet & Socket’s `API_KEY` as props to initialise. [Optional props](https://www.notion.so/Socket-Widget-Docs-b905871870e343c6833169ebbd356790) can be passed to customize the plugin’s color scheme, pre-select the chains/tokens & also customize token lists.
25
25
26
-
The full documentation for the widget can be found [here](https://www.notion.so/Socket-Widget-Docs-b905871870e343c6833169ebbd356790)
26
+
The full documentation for the plugin can be found [here](https://www.notion.so/Socket-Widget-Docs-b905871870e343c6833169ebbd356790)
27
27
28
28
## Installation
29
29
30
-
The widget can be installed via NPM or Yarn.
30
+
The plugin can be installed via NPM or Yarn.
31
31
32
32
**NPM :**
33
33
34
34
```bash
35
-
npm install @socket.tech/widget
35
+
npm install @socket.tech/plugin
36
36
```
37
37
38
38
**Yarn :**
39
39
40
40
```bash
41
-
yarn add @socket.tech/widget
41
+
yarn add @socket.tech/plugin
42
42
```
43
43
44
-
**Note :** The widget requires `react` (>=17.0.1) and `react-dom` (>=17.0.1) as peerDepencies.
44
+
**Note :** The plugin requires `react` (>=17.0.1) and `react-dom` (>=17.0.1) as peerDepencies.
45
45
46
46
## Initialization
47
47
48
48
Copy the snippet below to get started! Pass the `API_KEY` from a .env file and `Provider` from user’s connected wallet.
49
49
50
50
```tsx
51
-
import { Bridge } from"@socket.tech/widget";
51
+
import { Bridge } from"@socket.tech/plugin";
52
52
import { Provider } from"./providerComponent"
53
53
54
54
function SocketBridge() {
@@ -63,7 +63,7 @@ function SocketBridge() {
63
63
exportdefaultSocketBridge;
64
64
```
65
65
66
-
That’s it! You’ve successfully plugged your DApp into Socket! 🔌 For further customising the widget, check the widget[docs](https://www.notion.so/Socket-Widget-Docs-b905871870e343c6833169ebbd356790).
66
+
That’s it! You’ve successfully plugged your DApp into Socket! 🔌 For further customising the plugin, check the plugin[docs](https://www.notion.so/Socket-Widget-Docs-b905871870e343c6833169ebbd356790).
0 commit comments