Crypto SwapA crypto token-swap widget with live exchange rates, price impact, and an animated swap button.

WidgetsDeFi appCrypto dashboardWeb3 landing
Sell
2.41%
52.32 ETH
Buy
0.0503
1.07%

Add to your project

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/crypto-swap
2

For dark mode, add the dark class to your <html> element:

Optional
<html class="dark">

Install with AI Canvas MCP

With AI Canvas MCP, your AI knows every component we ship. Ask for one inside Claude Code, Codex, or Cursor and it installs the component you pick. Works with any AI Canvas account, free or premium.

About Crypto Swap

Crypto Swap is a Uniswap-style token-swap card for trading one crypto asset for another, not a fiat exchange — the dollar figures are reference valuations used only to derive the rate. Type a Sell amount, pick two tokens from a contained dropdown of real brand coin icons, and the Buy side recomputes live with an animated number that reflects a pool-depth price-impact model, a separate network-fee estimate, and a slippage-driven minimum received. A flip button swaps the direction and carries the amount across, each token shows its 24h trend, and the periwinkle Swap button runs an idle to swapping to success state machine with a check, glow, and spark burst. Motion drives every transition and Tailwind handles the borderless dual-theme surfaces, with adaptive decimal precision, full listbox keyboard accessibility, and reduced-motion support throughout. It is a polished fit for a DeFi app, a crypto dashboard widget, or a Web3 landing page.

Built with

MotionTailwind CSS

Frequently asked questions

Is Crypto Swap free to use?
Yes. Crypto Swap is part of the free AI Canvas library and is open source under the MIT license, so you can use it in personal and commercial projects.
How do I install Crypto Swap?
One command: npx shadcn@latest add https://aicanvas.me/r/crypto-swap.json, free with a free AI Canvas account. Or connect the AI Canvas MCP server and ask your AI editor to install Crypto Swap for you. You can also copy the source straight from the Code tab, no account needed. It works in any React project with Tailwind CSS.
What is Crypto Swap built with?
Crypto Swap is built with React and TypeScript, using Motion and Tailwind CSS. It ships with both light and dark styling.
Where would I use Crypto Swap?
Common uses include DeFi app, Crypto dashboard, and Web3 landing. Like every AI Canvas component, it is self-contained and drops into any React project.
Can I remix Crypto Swap with AI?
Yes. Crypto Swap ships with one comprehensive AI prompt written against the real source code. Open "Remix with AI" on this page to read and copy it into Claude, Cursor, ChatGPT, or any AI tool. Prompts are for remixing your own variation; for the exact component, install it with the one-command CLI.

Featured in collections

More like this