> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ripio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Embedding the widget

> The script tag and the web component's attributes.

The widget is a native [web component](https://developer.mozilla.org/en-US/docs/Web/Web_Components). To use it, import the script and mount the element in your page:

```html theme={null}
<script type="module" src="https://b2b-crypto-widget-front.sandbox.ripio.com/bundle.js"></script>

<ripio-crypto-widget token="<jwt>" currency="ARS" lang="es"></ripio-crypto-widget>
```

`<ripio-crypto-widget>` is the **only** public element. It works in any framework that supports native web components — React, Next.js, Vue, Angular — or standalone HTML.

### Attributes

| Attribute  | Query param | Default | Description                                                                                  |
| ---------- | ----------- | ------- | -------------------------------------------------------------------------------------------- |
| `token`    | `_to`       | `""`    | The session JWT from [`POST /auth`](/crypto-as-a-service/widget/get-started/authentication). |
| `lang`     | `_la`       | `es`    | UI language: `es`, `pt` or `en`.                                                             |
| `currency` | `_cu`       | `""`    | Base fiat currency.                                                                          |

<Warning>
  **The query parameter always wins over the attribute.** This matters for WebView integrations: the host points the WebView at `index.html?_to=…&_cu=…&_la=…` and can't set element attributes directly.
</Warning>

Language precedence: an explicit `lang` attribute or `_la` query param wins; otherwise the widget uses the language configured for your account; otherwise it falls back to `es`.

### Passing parameters in the URL

For a WebView or an `<iframe>` pointed at the widget's own page, use query parameters instead of attributes:

```
https://b2b-crypto-widget-front.sandbox.ripio.com/index.html?_to=<jwt>&_cu=ARS&_la=es
```

See [Mobile / WebView integration](/crypto-as-a-service/widget/get-started/webview) for a full example.

### Language

The `lang` attribute (or `_la` query param) accepts:

| Value | Language   |
| ----- | ---------- |
| `es`  | Spanish    |
| `pt`  | Portuguese |
| `en`  | English    |

### Theming

The widget's appearance follows your brand automatically once it's configured on your account — see [Theming](/crypto-as-a-service/widget/configuration/theming). You can also override it yourself with CSS custom properties on your page:

```css theme={null}
:root {
  --ripio-color-primary: #0064c8;
  --ripio-btn-border-radius: 8px;
  --ripio-font-family: "Inter";
}
```

These custom properties inherit into the widget's Shadow DOM, so the widget repaints itself with no further wiring on your side.

### Behavior inside your page

* The widget never modifies your page's URL — no History API calls, no hash changes, no deep links.
* Nothing inside it uses `position: fixed`; overlays and modals stay anchored to the widget's own container, never the page viewport.
* The widget doesn't load any third-party analytics or session-replay script.
