Matic Widget
Matic widget is an instance of Matic wallet that anyone can integrate to their website. The widget has been designed to support Matic wallet as well as Matic token bridge functionalities as part of any website. This simply means that integrating the widget gives a better user expereince and users do not have to navigate to another page to use the Matic functionalities.
Widget Developer dashboard
Widget developer dashboard is used to manage the widget. Developer can create, remove and customize the widget.
- Developer dashboard: https://wallet.matic.today/widgets/
- Create new widget: https://wallet.matic.today/widgets/settings
For creating a widget, DApp Name, RPC, Widget type have to be given as input.

Next step will be to adjust the widget settings based on the requirements which will appear after the widget is created. The last step will be to copy the embed code and use it on your website
- On the widget settings, scroll to bottom or select embed from left menu
- Select your widget button type
- Click to copy
<code>
area and paste it to your website

Example:

Events
Widget will emit events when user performs certain actions on widget. These events will be helpful to listen to the users interaction with the widget and can be then used to perform some action based on these events. The events can be listened as mentioned below.
closeWidget
widget will emit this event whenever user closes the widget.
Transfer Events
a. onTransferTxHash
Widget will emit this event when a transfer transaction is fired. This event is useful to get the transaction hash before the transaction gets confirmed.
b. onTransfer
Widget will emit this event when the transfer transaction is confirmed on the network.
c. onTransferError
Widget will emit this event when transfer transaction fails.
Deposit Events
a. onDepositTxHash
Widget will emit this event when deposit transaction is initiated.
b. onDeposit
Widget will emit this event when a deposit transaction is confirmed on the network.
c. onDepositError
Widget will emit this event when a deposit transaction fails.
Withdraw Init Events
a. onWithdrawInitTxHash
Widget will emit this event when initiate withdraw transaction is fired.
b. onWithdrawInit
Widget will emit this event when an intiaite withdraw transaction is confirmed on the network.
c. onWithdrawInitError
Widget will emit this event when an initiate withdraw transaction fails.
Withdraw Confirm Events
a. onWithdrawConfirmTxHash
Widget will emit this event when a confirm withdraw transaction is fired.
b. onWithdrawConfirm
Widget will emit this event when a confirm transaction is confirmed on the network.
c. onWithdrawConfirmError
Widget will emit this event when a confirm withdraw transaction fails.
Withdraw Exit Events
a. onWithdrawExitTxHash
Widget will emit this event a withdraw exit transaction is fired.
b. onWithdrawExit
Widget will emit this event when a withdraw exit transaction is confirmed on the network.
c. onWithdrawExitError
Widget will emit this event when a withdraw exit transaction fails.