> For the complete documentation index, see [llms.txt](https://docs.squidrouter.exchange/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.squidrouter.exchange/widget-integration/add-a-widget/deposit-widget/vite-installation.md).

# Vite Installation

## 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](/widget-integration/add-a-widget/deposit-widget/installing-the-widget.md) guide before proceeding.

### Installation Steps

#### Step 1: Install the package

```bash
yarn add @0xsquid/deposit-widget
```

#### Step 2: Add Polyfills

The widget's underlying wallet stack relies on some Node built-ins, so Vite needs browser polyfills:

1. Install the `vite-plugin-node-polyfills` plugin:

```bash
yarn add vite-plugin-node-polyfills -D
```

2. Update your `vite.config.ts` file:

```typescript
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`:

```tsx
import { DepositWidget, type DepositConfig } from "@0xsquid/deposit-widget";

const config: DepositConfig = {
  mode: "deposit",
  destinationAddress: "0xYourReceivingAddress",
  destinationToken: {
    address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", // USDC on Arbitrum
    chainId: "42161",
  },
  integrator: {
    id: "<your-integrator-id>",
    name: "Your App",
    logoUrl: "https://your.app/logo.png",
  },
};

function App() {
  return <DepositWidget config={config} />;
}

export default App;
```

Replace `<your-integrator-id>` with the Integrator ID you received from Squid.

### Customization

Pass `theme` and `themeType` to brand the widget — see the [Configuration](/widget-integration/add-a-widget/deposit-widget/configuration.md) page for all available options.

### Running Your Vite App

```bash
yarn dev
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.squidrouter.exchange/widget-integration/add-a-widget/deposit-widget/vite-installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
