---
name: avail-widgets-overview
description: End-to-end integration guide for Avail Widgets. Use Nexus Widget as the single unified component for all swap, send, and deposit flows. Legacy standalone widgets (FastBridge, FastTransfer, SwapWidget, Deposit, BridgeDeposit, UnifiedBalance, ViewHistory) have been deprecated and removed.
title: avail-widgets-overview
canonical_url: https://skilld.dev/gh/availproject/widgets/avail-widgets-overview
last_updated: 2026-09-29T07:05:50.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install availproject/widgets/avail-widgets-overview`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/avail-widgets-overview`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/availproject/widgets/avail-widgets-overview) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/avail-widgets-overview`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/avail-widgets-overview --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/avail-widgets-overview --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Avail Widgets Overview

## Nexus Widget is the only element you need

All legacy standalone widgets have been **deprecated and removed**. **Nexus Widget** is the single unified component that handles swap, send (transfer), and deposit flows.

| Legacy element | Status | Nexus Widget replacement |
|---|---|---|
| `FastBridge` | ❌ Removed | `NexusWidget` with `config.mode = "swap"` |
| `FastTransfer` | ❌ Removed | `NexusWidget` with `config.mode = "send"` |
| `SwapWidget` | ❌ Removed | `NexusWidget` with `config.mode = "swap"` |
| `Deposit` | ❌ Removed | `NexusWidget` with `config.mode = "deposit"` + `config.deposit` |
| `BridgeDeposit` | ❌ Removed | `NexusWidget` with `config.mode = "deposit"` + `config.deposit` |
| `UnifiedBalance` | ❌ Removed | Inline balance view in Nexus Widget |
| `ViewHistory` | ❌ Removed | Use `sdk.getMyIntents()` directly |

## Install Nexus Widget

**Default (npm — recommended):**
```bash
npm install @avail-project/widgets viem wagmi @tanstack/react-query
```

**Power users (shadcn — full source access):**
```bash
npx shadcn@latest add availproject/widgets/nexus
```

> Ask the user which install method they prefer if not specified. Default to npm.

## Import paths

**npm:**
```ts
import { NexusWidget, NexusProvider, useNexus } from "@avail-project/widgets";
```

**shadcn (local files):**
```ts
import { NexusWidget } from "@/components/nexus/nexus";
import NexusProvider, { useNexus } from "@/components/nexus/NexusProvider";
```

## Integrate end-to-end in any TS/React app

### 1. Install project deps (npm path)
```bash
npm install @avail-project/widgets viem wagmi @tanstack/react-query
```

### 2. Set up NexusProvider

**npm:**
```tsx
"use client";
import { NexusProvider } from "@avail-project/widgets";

export function AppNexusProvider({ children }: { children: React.ReactNode }) {
  return <NexusProvider config={{ network: "mainnet" }}>{children}</NexusProvider>;
}
```

**shadcn:**
```tsx
"use client";
import NexusProvider from "@/components/nexus/NexusProvider";

export function AppNexusProvider({ children }: { children: React.ReactNode }) {
  return <NexusProvider config={{ network: "mainnet" }}>{children}</NexusProvider>;
}
```

### 3. Initialize SDK on wallet connect

```tsx
"use client";

import { useEffect } from "react";
import { useAccount, useConnectorClient } from "wagmi";
import type { EthereumProvider } from "@avail-project/nexus-core";
// npm path:
import { useNexus } from "@avail-project/widgets";
// shadcn path: import { useNexus } from "@/components/nexus/NexusProvider";

export function InitNexusOnConnect() {
  const { status, connector } = useAccount();
  const { data: walletClient } = useConnectorClient();
  const { handleInit } = useNexus();

  useEffect(() => {
    if (status !== "connected") return;

    void (async () => {
      const mobileProvider = walletClient
        ? ({ request: (args: unknown) => walletClient.request(args as never) } as EthereumProvider)
        : undefined;
      const desktopProvider = await connector?.getProvider();
      const provider = mobileProvider ?? (desktopProvider as EthereumProvider | undefined);
      if (!provider || typeof provider.request !== "function") return;
      await handleInit(provider);
    })();
  }, [status, connector, walletClient, handleInit]);

  return null;
}
```

### 4. Render Nexus Widget

**npm:**
```tsx
import { NexusWidget } from "@avail-project/widgets";

// Swap mode (also handles bridges)
<NexusWidget config={{ mode: "swap" }} connectedAddress={address} />

// Send mode
<NexusWidget config={{ mode: "send" }} connectedAddress={address} />

// Deposit mode
<NexusWidget
  config={{
    mode: "deposit",
    destination: {
      chain: 8453,
      tokens: [{ address: "0xToken...", symbol: "USDC", decimals: 6 }],
    },
    depositAddress: "0xContract...",
    executeDeposit: (_symbol, tokenAddress, amount, _chainId, user) => ({
      to: "0xContract...",
      data: "0xCalldata...",
      tokenApproval: { toTokenAddress: tokenAddress, amount, spender: "0xContract..." },
    }),
  }}
  connectedAddress={address}
/>
```

**shadcn:**
```tsx
import { NexusWidget } from "@/components/nexus/nexus";
// Same config props, only import path changes
```

## Deposit/bridge config generation

For deposit and bridge mode, use the [Avail Configurator](https://configurator.availproject.org/) to generate the exact `depositConfig` object based on your contract and token setup.

## Nexus SDK agent skills

For detailed SDK integration guidance, use the **Nexus SDK agent skills** (`.agents/skills/`):

- `nexus-sdk-setup` — SDK initialization and wallet wiring
- `nexus-sdk-bridge-flows` — bridge, bridgeAndTransfer, bridgeAndExecute
- `nexus-sdk-swap-flows` — swapWithExactIn, swapWithExactOut, swapAndExecute
- `nexus-sdk-hooks-events` — intent hooks and event streaming
- `nexus-sdk-balances-metadata-utils` — balances, supported chains/tokens, formatters
- `nexus-sdk-integration` — end-to-end integration guide

## E2E readiness checklist
- Confirm wallet connects and `handleInit` runs once per session.
- Confirm `useNexus().nexusSDK` is non-null after connect.
- Confirm Nexus Widget renders and responds to mode, destination, prefill amount, and validation config.
- Confirm every flow (swap, send, deposit) can reach success.
- Confirm disconnect clears SDK state (`deinitializeNexus`).

## Common integration failures
- Invalid provider object:
  - Ensure provider has `request()`.
- Nexus Widget not rendering:
  - Ensure `NexusProvider` wraps your app and SDK is initialized.
- Empty balance/sources:
  - Ensure SDK init finished and wallet is connected on a supported network.
