Skip to content

Components

Event Feed

Live list of a contract's events, newest first, each linked to its transaction.

Follow a contract’s events as they happen: transfers, swaps, mints. New events appear at the top, each with its arguments and a link to the transaction. Screen readers hear new entries politely (role="log").

USDC transfers on Ethereum

  1. Loading recent events…
Terminal window
npx shadcn@latest add @0xui/event-feed
import { EventFeed } from "@/components/event-feed";
<EventFeed address={usdc} abi={erc20Abi} eventName="Transfer" args={{ to: address }} />;

args filters on indexed arguments, so { to: address } shows only incoming transfers. historyBlocks loads that many recent blocks first. Keep it small: public RPCs cap how many blocks one log request may cover.

<EventFeed
address={pool}
abi={poolAbi}
eventName="Swap"
renderEvent={(event) => <SwapRow args={event.args} />}
/>

Headless: useEventFeed(params) returns events, newest first and deduplicated.

Prop Type Default Description
address Address — Contract.
abi Abi — ABI with the event.
eventName string all Event to follow.
args object — Indexed-argument filter.
chainId number current Chain.
historyBlocks number 0 Recent blocks to load first.
max number 20 Events kept.
initialEvents FeedEvent[] — Past events from your own source.
renderEvent (event) => ReactNode — Custom row.
title ReactNode "Live events" Heading. null hides it.