Skip to content

Components

Transaction History

Transactions sent from your app, with live status. Stored in the browser.

A list of transactions sent from your app, newest first. Pending ones update live, and settled ones keep their result. It’s stored in this browser (localStorage), so it’s per device and survives reloads. Other tabs update too.

Connect the Demo Wallet and send a couple.

Recent transactions

Transactions you send will show up here.

Terminal window
npx shadcn@latest add @0xui/transaction-history

Record transactions wherever you send them, then render the list anywhere:

import { TransactionHistory, recordTransaction } from "@/components/transaction-history";
<TransactionButton
transaction={tx}
onSubmitted={(hash) =>
recordTransaction({ hash, chainId: 1, from: address, description: "Send 0.1 ETH" })
}
/>
<TransactionHistory />

By default, the list shows the connected account’s transactions (entries recorded with from). Pass from={null} to show all. recordTransaction works outside React too. It keeps the 50 most recent.

Prop Type Default Description
from Address | null connected Filter by sender. null shows all.
transactions HistoryEntry[] — Transactions from your own source instead of this browser’s.
pageSize number 10 Rows per page, with “Show more”.
clearable boolean true Show a Clear button.
title ReactNode "Recent transactions" Heading.
locale string runtime locale Locale for the relative times.

Also exported: useTransactionHistory, updateTransaction, clearTransactionHistory.