> For the complete documentation index, see [llms.txt](https://docs.squidrouter.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.squidrouter.com/widget-integration/add-a-widget/deposit-widget/vite-installation.md). Agents can also search and read this documentation through its [MCP server](https://docs.squidrouter.com/~gitbook/mcp).

# 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](https://docs.squidrouter.com/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](https://docs.squidrouter.com/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
