Embed Account Button
This is the main provider responsible for sharing context and exposing state via hooks.
Provides state and data to various components. Wrap ObviousEmbedProvider around your React dApp
import { ObviousEmbedProvider } from '@itsobvioustech/embed';
// Ideally in the root of your dApp
export const Web3Provider = ({ children }) => {
return (
// Always wrap this with Wagmi and QueryClient providers
<ObviousEmbedProvider embedKey="YOUR_OBVIOUS_EMBED_WALLET_KEY" settings={{}}>
{children}
</ObviousEmbedProvider>
)
}Props
embedKey *required
string
Reach out to us on telegram or discord for your key (Dashboard soon)
settings
object
Configure the settings of the embed modal. Eg: theme, radius, buttonLabel, etc.
You can customize the settings of Embedkit by passing an object to the settings prop.
Settings
theme
"light" | "dark"
Default:
lightchange between light and dark themes
radius
"none" | "small" | "medium" | "large"
Default:
mediumset a custom border radius
buttonLabel
string
Default:
Sign Inset a custom label for connect/login button
hideReceive
boolean
Default:
falsehide the receive section
hideBuy
boolean
Default:
falsehide the onramp section
hideSend
boolean
Default:
falsehide the send tab
hideSwap
boolean
Default:
falsehide the swap tab
hideBridge
boolean
Default:
falsehide the bridge tab
hideTokens
boolean
Default:
falsehide the tokens tab
hideNFTs
boolean
Default:
falsehide the NFTs tab
hideTransactions
boolean
Default:
falsehide the transactions tab
disableSwitchChain
boolean
Default:
falsedisable the switching chain functionality
defaultTab
"tokens" | "nfts" | "txns"
Default:
tokensset the default tab
export const Web3Provider = ({ children }) => {
return (
// Always wrap this with Wagmi and QueryClient providers
<ObviousEmbedProvider
embedKey="YOUR_OBVIOUS_EMBED_WALLET_KEY"
settings={{
// All settings are optional
theme: "light",
radius: "medium",
buttonLabel: "Sign In",
hideReceive: false,
hideBuy: false,
hideSend: false,
hideSwap: false,
hideBridge: false,
hideTokens: false,
hideNFTs: false,
hideTransactions: false,
disableSwitchChain: false,
defaultTab: "tokens",
}}
>
{children}
</ObviousEmbedProvider>
)
}