> 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/react-installation.md).

# React Installation

## React Installation Guide for the Deposit Widget

This guide will help you integrate the Squid Deposit Widget into your React application.

### 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.

### Basic Integration

After installing the npm package, follow these steps to add the widget to your React app:

1. Import the `DepositWidget` component and the `DepositConfig` type:

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

2. Define a config and render the widget:

```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 (
    <div className="App">
      <DepositWidget config={config} />
    </div>
  );
}
```

Replace `<your-integrator-id>` with the Integrator ID you received from Squid, and `destinationAddress` / `destinationToken` with the address and token you want to receive.

### Customization

Pass `theme` and `themeType` to the config to brand the widget:

```tsx
<DepositWidget
  config={{
    ...config,
    themeType: "dark", // or "light"
    theme: {
      // your theme overrides — see Configuration page
    },
  }}
/>
```

See the [Configuration](/widget-integration/add-a-widget/deposit-widget/configuration.md) page for the full list of options.


---

# 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/react-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.
