SSICEVS UIBeta
Crypto/Fiat

Crypto/Fiat

Dual-denomination amount field — type in fiat or in units, the toggle carries the value through the rate, and the counter underneath pops only the digits that changed.

When to use it

Dual-denomination entry, for when the user thinks in one currency and the system settles in another. Carrying the value through the rate on toggle means they never retype an amount they already entered.

Install

Adds Crypto/Fiat and its dependencies to your project through the shadcn CLI.

$ npx shadcn@latest add https://www.ssicevs.com/r/crypto-fiat.json

Props · CryptoFiat

PropTypeDefault
symbol?stringUnit ticker for the crypto side."ETH"
price?numberUnit price in the fiat currency — the counter value derives from it.3050
defaultAmount?string"2500"
onChange?(raw: string, denomination: "fiat" | "crypto") => void className?: stringFires with the raw digits and which denomination they are in.

Generated from the component source. Run npm run props:extract after changing a signature.