Vite Installation
Integrating the Deposit Widget into a Vite app
Vite Installation Guide for the Deposit Widget
This guide will help you integrate the Squid Deposit Widget into your Vite + TypeScript project.
Prerequisites
Ensure you have completed the steps in the Installing the Widget guide before proceeding.
Installation Steps
Step 1: Install the package
yarn add @0xsquid/deposit-widgetStep 2: Add Polyfills
The widget's underlying wallet stack relies on some Node built-ins, so Vite needs browser polyfills:
Install the
vite-plugin-node-polyfillsplugin:
yarn add vite-plugin-node-polyfills -DUpdate your
vite.config.tsfile:
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { nodePolyfills } from "vite-plugin-node-polyfills";
export default defineConfig({
plugins: [react(), nodePolyfills()],
});Step 3: Render the widget
Add the Deposit Widget to your desired component. For example, in src/App.tsx:
Replace <your-integrator-id> with the Integrator ID you received from Squid.
Customization
Pass theme and themeType to brand the widget — see the Configuration page for all available options.
Running Your Vite App
Last updated