coinstack
ui component after plasma
a stack of 3d coins that opens into a list of them, each coin turning once on its way to its row.
- US DollarUSD
- EuroEUR
- British PoundGBP
- UAE DirhamAED
- Brazilian RealBRL
- Japanese YenJPY
- Swiss FrancCHF
- Turkish LiraTRY
- TetherUSDT
- BitcoinBTC
- EtherETH
- USD CoinUSDC
- SolanaSOL
- ToncoinTON
states
install
a react component in three files and three.js (npm i three). the 3d part comes as its own chunk after the page; until then, and without webgl, the faces lie flat in their rows.
import { CoinStack } from "./coin-stack"; // brings coin-stack.css; three.js loads when it mounts
const coins = [
{ id: "usd", face: "/coins/usd.svg", name: "US Dollar", detail: "USD" },
{ id: "eur", face: "/coins/eur.svg", name: "Euro", detail: "EUR" },
{ id: "gbp", face: "/coins/gbp.svg", name: "British Pound", detail: "GBP" },
{ id: "aed", face: "/coins/aed.svg", name: "UAE Dirham", detail: "AED" },
];
export function ReceiveCash() {
return <CoinStack title="Receive cash" subtitle="From a bank account" items={coins} />;
}MIT
api
itemsid, face, name, detail; face is an image url or svg markupopen · onOpenChangethe list or the stack; leave out to let it keep its owndefaultOpenwhere it starts when it keeps its owntitle · subtitlethe head of the cardstackedcoins before the +N plate, 3sizethe coin's diameter, 40 pxspeeda time scale for every motion, 1input
click the stackopens the listclick the headcloses it againenter · spacethe same: the head is a buttoncursor on the stackthe coins fan outcursor on a rowits coin turns once; a tap on a phonenotes
after the add money sheet of the plasma wallet (the video by sergei semenov on recent.design). flags and marks are drawn for this page.
with reduced motion the coins don't turn and the stack stands still; the list still opens.
