# Onthis Widget

#### NPM Installation

```javascript
npm i onthis-library
```

#### Yarn Installation

```
yarn add onthis-library
```

#### Widget Usage

{% code overflow="wrap" %}

```javascript
import { BridgeAndSwap } from "onthis-library";

const config = {
    name: "[TOKEN SYMBOL]", // e.g ETH
    logo: logo, // Project logo, suggested resolution 800x800 pixels.
    web3modalProjectId: process.env.WEB3_MODAL_PROJECT_ID, // We will provide this.
    rounded: true,
    primaryColor: "#A0E7E5", // change to match your branding.
    secondaryColor: "#B4F8C8", // change to match your branding.
    chainId: 42161, // shows up as destination chain.
    tokenAddress: "0x9e64d3b9e8ec387a9a58ced80b71ed815f8d82b5" // your token.
  }

<BridgeAndSwap config={config} />
```

{% endcode %}


---

# Agent Instructions: 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.onthis.xyz/overview/dapps/onthis-widget.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.
