skills/nexus-elements-overview/SKILL.md
End-to-end integration guide for Nexus Elements. Use Nexus One 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.
npx skillsauth add availproject/nexus-elements nexus-elements-overviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
All legacy standalone widgets have been deprecated and removed. Nexus One is the single unified component that handles swap, send (transfer), and deposit flows.
| Legacy element | Status | Nexus One replacement |
|---|---|---|
| FastBridge | ❌ Removed | NexusOne with config.mode = "swap" |
| FastTransfer | ❌ Removed | NexusOne with config.mode = "send" |
| SwapWidget | ❌ Removed | NexusOne with config.mode = "swap" |
| Deposit | ❌ Removed | NexusOne with config.mode = "deposit" + opportunities |
| BridgeDeposit | ❌ Removed | NexusOne with config.mode = "deposit" + opportunities |
| UnifiedBalance | ❌ Removed | Inline balance view in Nexus One |
| ViewHistory | ❌ Removed | Use sdk.getMyIntents() directly |
npx shadcn@latest add @nexus-elements/nexus-one
pnpm add @avail-project/nexus-core wagmi viem lucide-react @tanstack/react-query
Add this mapping in components.json:
"registries": {
"@nexus-elements/": "https://elements.nexus.availproject.org/r/{name}.json"
}
Install and wire nexus-provider before Nexus One:
npx shadcn@latest add @nexus-elements/nexus-provider
Wrap your app with NexusProvider:
"use client";
import NexusProvider from "@/components/nexus/NexusProvider";
export function AppNexusProvider({ children }: { children: React.ReactNode }) {
return <NexusProvider config={{ network: "mainnet" }}>{children}</NexusProvider>;
}
"use client";
import { useEffect } from "react";
import { useAccount, useConnectorClient } from "wagmi";
import type { EthereumProvider } from "@avail-project/nexus-core";
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;
}
import { NexusOne } from "@/components/nexus-one/nexus-one";
// Swap mode (also handles bridges)
<NexusOne config={{ mode: "swap" }} connectedAddress={address} />
// Send mode
<NexusOne config={{ mode: "send" }} connectedAddress={address} />
// Deposit mode
<NexusOne
config={{
mode: "deposit",
opportunities: [{ /* ... */ }],
}}
connectedAddress={address}
/>
For detailed SDK integration guidance, use the Nexus SDK agent skills (.agents/skills/):
nexus-sdk-setup — SDK initialization and wallet wiringnexus-sdk-bridge-flows — bridge, bridgeAndTransfer, bridgeAndExecutenexus-sdk-swap-flows — swapWithExactIn, swapWithExactOut, swapAndExecutenexus-sdk-hooks-events — intent hooks and event streamingnexus-sdk-balances-metadata-utils — balances, supported chains/tokens, formattersnexus-sdk-integration — end-to-end integration guidehandleInit runs once per session.useNexus().nexusSDK is non-null after connect.deinitializeNexus).request().NexusProvider wraps your app and SDK is initialized.development
DEPRECATED — ViewHistory has been removed. Intent history is not included in Nexus One V1. Use sdk.getMyIntents() directly for programmatic history access. Refer to the nexus-sdk-* agent skills for guidance.
development
DEPRECATED — UnifiedBalance has been removed. Nexus One includes an inline balance view. Refer to the nexus-sdk-* agent skills for balance API guidance.
development
DEPRECATED — FastTransfer has been removed. Use Nexus One (config.mode = "send") for all cross-chain recipient transfer flows. Refer to the nexus-sdk-* agent skills for current integration guidance.
development
DEPRECATED — SwapWidget has been removed. Use Nexus One (config.mode = "swap") for all cross-chain swap and bridge flows. Refer to the nexus-sdk-* agent skills for current integration guidance.