> 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/react-installation.md). Agents can also search and read this documentation through its [MCP server](https://docs.squidrouter.com/~gitbook/mcp).

# React Installation

Installing the React component

## 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](https://docs.squidrouter.com/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](https://docs.squidrouter.com/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 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/react-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.
