You can install the fast-bridge component into any project using the shadcn CLI via a direct URL.
pnpm dlx shadcn@latest add @nexus-elements/fast-bridgeIf you’re running this repo locally:
- Start the dev server in this repo:
pnpm dev- Install via direct URL:
pnpm dlx shadcn@latest add http://localhost:3000/r/fast-bridge.json- The CLI will install the necessary UI primitives and utilities listed as
registryDependencies. - If you prefer npm or yarn, replace the
pnpm dlxwithnpxfor example, command with the equivalent for your package manager.
- Swaps (
Swaps,SwapExactIn,SwapExactOut) and Fast Bridge now support:onStart?(): void— called when a transaction begins.onError?(message: string): void— called when a transaction fails.onComplete?(amount?: string): void— called on success (existing).
- Internals now use reusable hooks to minimize
useEffectanduseState:useStopwatch,useInterval,usePolling,useDebounced*, and a shareduseTransactionSteps.
- Behavior is unchanged; no external packages were added.
- shadcn Registry Getting Started: https://ui.shadcn.com/docs/registry/getting-started.md
- Item schema: https://ui.shadcn.com/docs/registry/registry-item-json.md