Skip to content

availproject/nexus-elements

Repository files navigation

Nexus Elements

Install Fast Bridge (shadcn)

You can install the fast-bridge component into any project using the shadcn CLI via a direct URL.

Direct registry (zero setup)

pnpm dlx shadcn@latest add @nexus-elements/fast-bridge

Local development (install from localhost)

If you’re running this repo locally:

  1. Start the dev server in this repo:
pnpm dev
  1. Install via direct URL:
pnpm dlx shadcn@latest add http://localhost:3000/r/fast-bridge.json

Notes

  • The CLI will install the necessary UI primitives and utilities listed as registryDependencies.
  • If you prefer npm or yarn, replace the pnpm dlx with npx for example, command with the equivalent for your package manager.

API updates (performance-focused, no new deps)

  • 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 useEffect and useState:
    • useStopwatch, useInterval, usePolling, useDebounced*, and a shared useTransactionSteps.
  • Behavior is unchanged; no external packages were added.

References

About

Prebuilt React components for Nexus distributed via shadcn/ui cli

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published