Skip to content

Commit eb073e8

Browse files
committed
Merge branch 'main' of github.com:SocketDotTech/widget
merge
2 parents 99573a5 + 840fd69 commit eb073e8

File tree

2 files changed

+80
-1
lines changed

2 files changed

+80
-1
lines changed

README

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<p align="center" style="align: center">
2+
<h1 align="center">Socket Widget</h1>
3+
<p align="center">Seamless bridging experience into a single fully customizable React Component</p>
4+
<p align="center" style="align: center;">
5+
<a href="https://www.npmjs.com/package/@socket.tech/widget">
6+
<img src="https://img.shields.io/npm/v/@socket.tech/widget" alt="npm version"/>
7+
</a>
8+
<a href="https://npmtrends.com/@socket.tech/widget">
9+
<img src="https://img.shields.io/npm/dm/@socket.tech/widget" alt="Downloads" />
10+
</a>
11+
<a href="https://github.com/SocketDotTech/widget/stargazers">
12+
<img src="https://img.shields.io/github/stars/SocketDotTech/widget" alt="Github Stars" />
13+
</a>
14+
<a href="https://github.com/SocketDotTech/widget/blob/main/license">
15+
<img src="https://img.shields.io/github/license/SocketDotTech/widget" alt="License">
16+
</a>
17+
</p>
18+
</p>
19+
20+
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!
21+
22+
![Themes](https://user-images.githubusercontent.com/20141508/180805890-208eacd4-e841-4294-9a7f-65aa8e249a0c.png)
23+
24+
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.
25+
26+
The full documentation for the widget can be found [here](https://www.notion.so/Socket-Widget-Docs-b905871870e343c6833169ebbd356790)
27+
28+
## Installation
29+
30+
The widget can be installed via NPM or Yarn.
31+
32+
**NPM :**
33+
34+
```bash
35+
npm install @socket.tech/widget
36+
```
37+
38+
**Yarn :**
39+
40+
```bash
41+
yarn add @socket.tech/widget
42+
```
43+
44+
**Note :** The widget requires `react` (>=17.0.1) and `react-dom` (>=17.0.1) as peerDepencies.
45+
46+
## Initialization
47+
48+
Copy the snippet below to get started! Pass the `API_KEY` from a .env file and `Provider` from user’s connected wallet.
49+
50+
```tsx
51+
import { Bridge } from "@socket.tech/widget";
52+
import { Provider } from "./providerComponent"
53+
54+
function SocketBridge() {
55+
return (
56+
<Bridge
57+
provider={Provider}
58+
API_KEY={process.env.SOCKET_API_KEY}
59+
/>
60+
)
61+
}
62+
63+
export default SocketBridge;
64+
```
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).
67+
68+
## Documentation
69+
70+
- [Initialisation](https://www.notion.so/Socket-Widget-Docs-b905871870e343c6833169ebbd356790)
71+
- [Customisation](https://www.notion.so/Socket-Widget-Docs-b905871870e343c6833169ebbd356790)
72+
- [API reference](https://www.notion.so/Socket-Widget-Docs-b905871870e343c6833169ebbd356790)
73+
74+
## Example App
75+
76+
Work In Progress 🛠
77+
78+
## More themes... 😎
79+
80+
![More Themes](https://user-images.githubusercontent.com/20141508/180805803-f2e85617-c082-4354-90d1-1838ab9ec722.png)

0 commit comments

Comments
 (0)