> For the complete documentation index, see [llms.txt](https://docs.transientlabs.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.transientlabs.xyz/integrations/embeddable-components.md).

# Embeddable Components

These are small, ready-made HTML elements (web components) that add blockchain features — connecting a wallet, running an auction, minting an NFT, redeeming tokens — to any web page. You add two lines to your page's `<head>`, then place the elements you want in the page like regular HTML tags. No React or build step required: they work in plain HTML and inside any framework (React, Vue, Svelte, WordPress, Webflow, etc.).

**Latest Version: 1.8.0**

### What's Included

<table><thead><tr><th width="247.328125">Element</th><th>What it does</th></tr></thead><tbody><tr><td><code>&#x3C;tl-connect-button></code></td><td>A "Connect Wallet" button.</td></tr><tr><td><code>&#x3C;tl-siwe-button></code></td><td>"Sign in with Ethereum" — proves a user owns their wallet.</td></tr><tr><td><code>&#x3C;tl-auction></code></td><td>A live NFT auction (bid, buy now, settle).</td></tr><tr><td><code>&#x3C;tl-mint-page-721></code></td><td>A mint page for a 1-of-1 / ERC-721 NFT collection.</td></tr><tr><td><code>&#x3C;tl-mint-page-1155></code></td><td>A mint page for an edition / ERC-1155 token.</td></tr><tr><td><code>&#x3C;tl-snr-erc1155tl-raffle></code></td><td>"Send and receive" raffle: send tokens in, get a raffle entry.</td></tr><tr><td><code>&#x3C;tl-snr-erc1155tl></code></td><td>Send tokens in, receive a fixed ERC-1155 token back.</td></tr><tr><td><code>&#x3C;tl-snr-erc721tl></code></td><td>Send tokens in, receive a freshly minted ERC-721 NFT back (with a reveal).</td></tr><tr><td><code>&#x3C;tl-snr-currency></code></td><td>Send currency in, redeem according to the contract's rules.</td></tr></tbody></table>

## Usage

Use in any webpage!

#### 1. Configure and load (in the `<head>`)

`window.tlConfig` is optional — every field has a sensible default — but setting `appName` and a `walletConnectProjectId` is recommended for a polished wallet flow.

```html
<head>
  <script>
    window.tlConfig = {
      mode: "light",                          // "light" or "dark"
      appName: "My Cool App",                 // shown in the wallet connect dialog
      appDescription: "My cool app's description",
      walletConnectProjectId: "wallet-connect-id",
      // Optional: override the default RPC URL per chain. Any you leave out use
      // the public default shown below. Testnet keys are only used when testnet: true.
      rpcUrls: {
        // Mainnets
        ethereum: "",       // defaults to https://ethereum-rpc.publicnode.com
        shape: "",          // defaults to https://mainnet.shape.network
        base: "",           // defaults to https://base-rpc.publicnode.com
        arbitrum: "",       // defaults to https://arbitrum-one-rpc.publicnode.com
      }
    }
  </script>
  <script type="module" src="https://cdn.transientlabs.xyz/embeds/v1.8.0/index.js"></script>
  <link rel="stylesheet" href="https://cdn.transientlabs.xyz/embeds/v1.8.0/index.css">
</head>
```

#### 2. Add the elements you want (in the `<body>`)

Each element is configured with HTML attributes (`chain-id`, `contract-address`, etc.). Use only the elements you need — you don't have to include all of them.

```html
<body>
  <style>
    /* add any style overrides here*/
  </style>
  <!-- Omit any of the components you don't need below -->
  <tl-connect-button variant="default"></tl-connect-button>

  <tl-siwe-button site-name="My Site name" terms-url="https://my-site.com/terms"></tl-siwe-button>

  <tl-auction chain-id="8453" contract-address="0x2b4b2d47c8db371b006e3df14245c12193a185dc" token-id="1"
    auction-house-address="0x6f66b95a0c512f3497fb46660e0bc3b94b989f8d" refresh-interval="10000"></tl-auction>

  <tl-mint-page-721 chain-id="8453" contract-address="0xb38bd444399cd76c3f91aa2455052834e3451911"
    mint-contract-address="0x384092784cfaa91efaa77870c04d958e20840242"
    allowlist-url="https://dv0xp0uwyoh8r.cloudfront.net/stacks/c8aeee8f-7d14-4403-a8b2-fe06f97a79cc/allowlist"
    slug="shape-study" refresh-interval="10000"></tl-mint-page-721>

  <tl-mint-page-1155 chain-id="8453" contract-address="0xb38bd444399cd76c3f91aa2455052834e3451911" token-id="1"
    mint-contract-address="0x32953d7ae37b05075b88c34e800ae80c1cb1b794"
    allowlist-url="https://dv0xp0uwyoh8r.cloudfront.net/stacks/c8aeee8f-7d14-4403-a8b2-fe06f97a79cc/allowlist"
    slug="shape-study" refresh-interval="10000"></tl-mint-page-1155>

  <tl-snr-erc1155tl-raffle chain-id="8453" raffle-contract-address="0xE9D8123BF045158B2b7608Cc48A4562770246902"
    refresh-interval="5000"></tl-snr-erc1155tl-raffle>

  <tl-snr-erc1155tl chain-id="8453" contract-address="0x98d90d88632fEB8b6fF509c5bE4c598174Cd2A14"
    input-contract-address="0xa9e448617188458ff7e2e9ef31596494f7a8ac68" input-token-id="1"
    refresh-interval="5000"></tl-snr-erc1155tl>

  <tl-snr-erc721tl chain-id="8453" contract-address="0x98d90d88632fEB8b6fF509c5bE4c598174Cd2A14"
    input-contract-address="0xa9e448617188458ff7e2e9ef31596494f7a8ac68" input-token-id="1"
    refresh-interval="5000"></tl-snr-erc721tl>

  <tl-snr-currency chain-id="8453" contract-address="0xe08B3174D495E04491f9Dd8Ae3d684564A95710C"
    refresh-interval="5000"></tl-snr-currency>
</body>
```

## Style Overrides

You need to add the style overrides in the body

The components are built with tailwindcss v4 and Shadcn/ui. You'll override css variables for main colors and style. There are also classes that you can override for more control (advanced).

CSS Variables:

```css
:root {
  --radius: 0.5rem;
  --title-font: "Inter";
  --body-font: "Inter";
  --mono-font: "Roboto Mono";
  --border-width: 2px;
  --background: oklch(1 0 0);
  --foreground: oklch(0.141 0.005 285.823);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.141 0.005 285.823);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.141 0.005 285.823);
  --primary: oklch(0.21 0.006 285.885);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.967 0.001 286.375);
  --secondary-foreground: oklch(0.21 0.006 285.885);
  --muted: oklch(0.967 0.001 286.375);
  --muted-foreground: oklch(0.552 0.016 285.938);
  --accent: oklch(0.967 0.001 286.375);
  --accent-foreground: oklch(0.21 0.006 285.885);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.21 0.006 285.885);
  --input: oklch(0.92 0.004 286.32);
  --dialog: oklch(0.21 0.006 285.885);
  --ring: oklch(0.705 0.015 286.067);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.141 0.005 285.823);
  --sidebar-primary: oklch(0.21 0.006 285.885);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.967 0.001 286.375);
  --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
  --sidebar-border: oklch(0.92 0.004 286.32);
  --sidebar-ring: oklch(0.705 0.015 286.067);
}

.dark {
  --background: oklch(0.141 0.005 285.823);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.21 0.006 285.885);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.21 0.006 285.885);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.92 0.004 286.32);
  --primary-foreground: oklch(0.21 0.006 285.885);
  --secondary: oklch(0.274 0.006 286.033);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.274 0.006 286.033);
  --muted-foreground: oklch(0.705 0.015 286.067);
  --accent: oklch(0.274 0.006 286.033);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(0.985 0 0);
  --input: oklch(1 0 0 / 15%);
  --dialog: oklch(0.985 0 0);
  --ring: oklch(0.552 0.016 285.938);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.21 0.006 285.885);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.274 0.006 286.033);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.552 0.016 285.938);
}
```

Custom Class Overrides:

```css
.tl-root
.tl-address-display
.tl-dialog-overlay
.tl-dialog-content
.tl-dialog-header
.tl-dialog-footer
.tl-dialog-title
.tl-dialog-description
.tl-dialog-action
.tl-dialog-cancel
.tl-dialog-close
.tl-input
.tl-title-3
.tl-title-4
.tl-paragraph
.tl-caption
.tl-button-default
.tl-button-destructive
.tl-button-outline
.tl-button-secondary
.tl-button-ghost
.tl-button-link
.tl-button-size-default
.tl-button-size-sm
.tl-button-size-lg
.tl-button-size-icon
.tl-toaster
.tl-countdown-root
.tl-countdown-text-group
.tl-countdown-label
.tl-countdown-time
.tl-tx-dialog-title
.tl-tx-dialog-root
.tl-tx-dialog-spinner
.tl-tx-dialog-text
.tl-wrapper
.tl-connect-button
.tl-siwe-button
.tl-siwe-connect-button
.tl-auction-root
.tl-auction-top-section
.tl-auction-price-label
.tl-auction-price-display
.tl-auction-highest-bidder-section
.tl-auction-highest-bidder-display
.tl-auction-button-group
.tl-auction-submit-bid-button
.tl-auction-buy-now-button
.tl-auction-settle-button
.tl-auction-connect-button
.tl-auction-duration-caption
.tl-auction-bottom-text-section
.tl-auction-view-on-transient-text
.tl-auction-bids-caption
.tl-auction-history-title
.tl-auction-history-group
.tl-auction-history-bid
.tl-auction-history-list-entry
.tl-auction-history-cancel-entry
.tl-auction-history-bid-entry
.tl-auction-history-settle-entry
.tl-auction-history-buy-now-entry
.tl-auction-empty-state-container
.tl-auction-bid-title
.tl-auction-bid-root
.tl-auction-bid-input-group
.tl-auction-bid-input
.tl-auction-bid-button
.tl-auction-min-bid
.tl-mint-root
.tl-mint-top-section
.tl-mint-phase
.tl-mint-supply
.tl-mint-middle-section
.tl-mint-middle-left-section
.tl-mint-allowance-caption
.tl-mint-price-caption
.tl-mint-price
.tl-mint-protocol-fee-caption
.tl-mint-middle-right-section
.tl-mint-bottom-section
.tl-mint-button
.tl-mint-connect-button
.tl-mint-recipient-section
.tl-mint-recipient-display
.tl-mint-to-other-button
.tl-mint-disabled-text
.tl-mint-recipient-dialog
.tl-mint-recipient-input
.tl-mint-save-recipient
.tl-mint-success-dialog-root
.tl-mint-recipient-dialog
.tl-mint-success-token-root
.tl-mint-success-token-image
.tl-mint-success-token-text
.tl-mint-success-token-title
.tl-mint-success-view-on-opensea-text
.tl-mint-success-loading-text
.tl-mint-view-on-transient-text
.tl-snr-root
.tl-snr-redemption-data-container
.tl-snr-user-data-container
.tl-snr-connect-button
.tl-snr-section-title
.tl-snr-data-span
.tl-snr-link
.tl-snr-counter-container
.tl-snr-actions-container
.tl-snr-redemption-disabled-text
.tl-snr-action-button
.tl-snr-success-dialog-root
.tl-snr-success-dialog
.tl-snr-success-token-root
.tl-snr-success-token-image
.tl-snr-success-token-text
.tl-snr-success-token-title
.tl-snr-success-view-on-opensea-text
.tl-snr-success-loading-text
```

## Custom Events

The components dispatch events on `document` so you can hook in your own logic (analytics, confirmations, redirects, etc.). Each event carries its data on the standard `event.detail` field:

```javascript
document.addEventListener("tl-mint-721", (event) => {
  console.log("Minted!", event.detail);
  // e.g. { sender, chainId, contractAddress, logs }
});
```

| Event                           | Fired when                      | `event.detail` contains                                  |
| ------------------------------- | ------------------------------- | -------------------------------------------------------- |
| `tl-wallet-connect`             | A wallet connects               | `address`                                                |
| `tl-wallet-disconnect`          | A wallet disconnects            | *(none)*                                                 |
| `tl-auction-bid`                | A bid is placed                 | `sender, chainId, contractAddress, tokenId, listing?`    |
| `tl-buy-now`                    | An item is bought now           | `sender, chainId, contractAddress, tokenId, listing?`    |
| `tl-auction-settle`             | An auction is settled           | `sender, chainId, contractAddress, tokenId, listing?`    |
| `tl-mint-721`                   | An ERC-721 is minted            | `sender, chainId, contractAddress, logs`                 |
| `tl-mint-1155`                  | An ERC-1155 is minted           | `sender, chainId, contractAddress, tokenId`              |
| `tl-siwe`                       | A user signs in with Ethereum   | `message, signature`                                     |
| `tl-snr-erc1155tl-raffle-entry` | A raffle entry is submitted     | `sender, chainId, raffleContractAddress`                 |
| `tl-snr-erc1155tl-raffle-claim` | A raffle prize is claimed       | `sender, chainId, raffleContractAddress, isWinner`       |
| `tl-snr-currency-redemption`    | A currency redemption succeeds  | `sender, chainId, contractAddress, numRedemptions`       |
| `tl-snr-erc1155tl-redemption`   | An ERC-1155 redemption succeeds | `sender, chainId, contractAddress, numRedemptions`       |
| `tl-snr-erc721tl-redemption`    | An ERC-721 redemption succeeds  | `sender, chainId, contractAddress, numRedemptions, logs` |


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.transientlabs.xyz/integrations/embeddable-components.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
