# Crypto/Fiat

> A crypto amount input that switches between fiat and token units at the current rate, for wallets, exchanges and payment flows.

A React component for shadcn/ui and Tailwind CSS, from ssych ui (https://ssych.com). Free, MIT licensed, the source lands in your repo.

## Install

```bash
npx shadcn@latest add @ssych/crypto-fiat
```

npm dependencies: clsx, lucide-react, motion, tailwind-merge

## Props

`<CryptoFiat />`

- `symbol?`: `string`
- `price?`: `number`
- `defaultAmount?`: `string`
- `onChange?`: `(raw: string, denomination: "fiat" | "crypto") => void className?: string`

## Where it belongs

- Trading UI: Dark trading interface components for React and Tailwind: swap tickets, holdings tables, blotters, tapes and candlestick charts. (https://ssych.com/library/s/trading-ui)
- Crypto: Crypto interface components for React and Tailwind: swap tickets, token balances, candlesticks, tapes and market heatmaps. (https://ssych.com/library/s/crypto)
- Controls: React control components: a segmented control, currency toggle, amount input with presets, avatar stack and preference cards. (https://ssych.com/library/s/controls)

## Related

- Swap Ticket: https://ssych.com/library/swap-ticket.md
- Holdings Table: https://ssych.com/library/holdings-table.md
- Fills Blotter: https://ssych.com/library/fills-blotter.md
- Trade Tape: https://ssych.com/library/trade-tape.md
- Ticker Tape: https://ssych.com/library/ticker-tape.md
- Candlestick Chart: https://ssych.com/library/candlestick.md
- Balance Header: https://ssych.com/library/balance-header.md
- Trade Journal Table: https://ssych.com/library/trade-journal-table.md

## Links

- Live preview and code: https://ssych.com/library/crypto-fiat
- Source: https://github.com/savvasicevs/ssych-ui
- All components: https://ssych.com/llms-full.txt
