Componentdata0.75 KB gzipZero dependencies
Wallet Card
Wallet balance card with top-up and mini transactions.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add wallet-cardOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { WalletCard } from "@/components/ui/wallet-card"; <WalletCard />Source code
wallet-card.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxwallet-card.tsx50 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface WalletTransaction { id: string; label: string; amount: string; negative?: boolean; date?: string;} export interface WalletCardProps extends React.HTMLAttributes<HTMLDivElement> { balance: string; onTopUp?: () => void; transactions?: WalletTransaction[];}Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { WalletCard } from "@/components/ui/wallet-card"; <WalletCard />| Prop | Type | Description |
|---|---|---|
| balance | string | Configures balance. |
| onTopUp | () => void | Callback invoked on top up. |
| transactions | WalletTransaction[] | Configures transactions. (Default: []) |