createAppKit
from @reown/appkit
and the necessary chains and WagmiAdapter from @reown/appkit-adapter-wagmi
.VITE_PROJECT_ID
environment variable which you can get from Reown Dashboard.browser
check ensures AppKit is only initialized in the browser environment, which is important for SvelteKit’s SSR compatibility.<appkit-button />
web component. After setting up AppKit in your application, you can simply use the button component anywhere in your Svelte templates:
<appkit-button />
is a web component that’s automatically registered when AppKit is initialized. No additional imports are required.
initializeAppKit
function and web components:open
method from AppKit instance:open
function:wagmiConfig
from our AppKit WagmiAdapter configuration.