# Integrate Ante using React

The Ante widget has been published as an npm package:

{% embed url="<https://www.npmjs.com/package/@antefinance/ante-widget-react>" %}

### Install ante-widget-react

**npm:** `npm i @antefinance/ante-widget-react`

**yarn:** `yarn add @antefinance/ante-widget-react`

### Build

```
npm i
npm run build
```

### Using AnteWidget

Import `AnteWidget` from the `ante-widget-react` package:

<pre class="language-typescript"><code class="lang-typescript"><strong>import AnteWidget from '@antefinance/ante-widget-react';
</strong>import '@antefinance/ante-widget/dist/widget.css'; // This will import the styles
</code></pre>

Then add the appropriate `AnteWidget` component where desired on your app:

```typescript
function Example() {
  ...
  return (
    <div>
      // To show the overall trust tier of a protocol
      <AnteWidget.Protocol name='PROTOCOL_NAME' />
      
      // To show the trust score on a specific Ante Test
      <AnteWidget.Test address='ANTE_TEST_ADDRESS' chain='0x1' />
    </div>
  );
}
```

{% hint style="warning" %}
Note: the protocol name string is case sensitive. If in doubt, check how the protocol name is spelled in the Ante app. Chain IDs can be looked up at <https://chainlist.org/>.
{% endhint %}

### Example of usage

The following code will generate badges for the Ante protocol as well as one of the Ante Tests that tests the ante protocol:

```
<AnteWidget.Protocol name='Ante' />
<AnteWidget.Test address='0x2EdC35B39BFBca6A52eA35612C2684D3D7654763' chain='0x1'>
```

<img src="/files/xt2w4tfmr9gurdPxJVSV" alt="" data-size="original">![](/files/rgkthoho0J6gjpiYtSui)


---

# 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.ante.finance/ante/v05/for-devs/integrate-ante/integrate-ante-using-react.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.
