Skip to main content

React Framework


Add the following dependencies to integrate the widget into any React project:

yarn add @polkadot/extension-inject # required for polkadot wallet injections

And similarly:

yarn add @buildwithsygma/sygmaprotocol-react-widget @buildwithsygma/sygma-sdk-core

Integrating The Widget Into Your React Code

After installation, add the widget into your code using:

import React from "react";
import { SygmaProtocolReactWidget } from '@buildwithsygma/sygmaprotocol-react-widget';

function MyDapp(){
return (
<SygmaProtocolReactWidget />

export default MyDapp;

You can also pass props to the widget component to customize widget behaviour. See Properties for more.