Inbox Page React block for Tailwind CSS v4
v1.0.1Updated in 1.3.0
A React marketplace inbox page: chats about your listings and ads you asked about, with the listing pinned on top, offers and voice notes.
The list shows every conversation, newest first: tap or click a row to open it (All, Buying, Selling and Unread filter it; the search finds names, listing titles and message text, accents optional). A long press on a row (or the ... button that appears on hover and focus) opens its menu: mark as read or unread, archive, mute, delete (asks first). The list menu opens the archive and the notification settings. On phones the conversation slides over the list; swipe from the left edge, tap the back arrow or press Escape to go back, and the list keeps its scroll. The header shows the person with their verified badge and when they were last active, or that they are typing; its menu opens the profile, blocks (the composer says You blocked this person, with Unblock), reports, archives or deletes. Under it the listing stays pinned with its photo, price and status: View ad, and on your own listings Reserve / Cancel reservation and Mark as sold (asks first; a sold listing greys out). Messages are grouped by day (Today, Yesterday, then the date) with read receipts; photos open a full screen viewer, voice notes play in place, offers you received have Accept and Decline. Scroll up for older messages (the position holds); when a message arrives while you read back, a New message pill takes you down. The composer: quick replies on short threads fill the field, the photo button attaches an image (a preview chip you can remove), Offer opens a dialog with the amount (buying side), Enter sends on desktop and Shift+Enter adds a line (touch keyboards add lines, the button sends; see sendOnEnter). A failed message shows Retry. With autoReply the other side types for a moment and answers; offers are accepted near the price or countered once. Alt+Arrow up / down move between conversations while focus is in the page. Incoming messages are announced to screen readers.
Inbox Page is a Pro React block in the React blocks category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add inbox-page, together with Alert Dialog, Audio Player, Avatar, Badge, Button and 27 more and the npm packages motion and lucide-react.
Add to a project
Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup
npx wingo-ui@latest add inbox-pageInbox Page is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans
Usage
Import InboxPage from @/components/blocks/inbox-page.
// app/(market)/messages/page.tsx (the shell lives in app/(market)/layout.tsx: <MarketplaceShell layout="fill">{children}</MarketplaceShell>)
"use client"
import { InboxPage, type InboxOutgoingMessage } from "@/components/blocks/inbox-page"
export default function MessagesPage() {
return (
<InboxPage
height="fill"
autoReply={false}
onSend={async (conversationId: string, message: InboxOutgoingMessage) => {
const response = await fetch(`/api/conversations/${conversationId}/messages`, { method: "POST", body: JSON.stringify(message) })
if (!response.ok) throw new Error("The message could not be sent")
}}
onArchive={async (conversationId: string, archived: boolean) => {
await fetch(`/api/conversations/${conversationId}`, { method: "PATCH", body: JSON.stringify({ archived }) })
}}
/>
)
}Props
conversationsInboxConversation[]The conversations, controlled ({ id, with: PresenceUser & { verified?, rating? }, listing: { id, title, price, priceType, image, status: "active" | "reserved" | "sold", mine, href?, priceSuffix? }, messages: InboxMessage[], unread, archived?, muted?, blocked? }); pair it with onConversationsChange.
defaultConversationsInboxConversation[]The conversations while uncontrolled; defaults to INBOX_SAMPLE.conversations (eight Northwind Market threads: Daniel Reed about the bike, Olivia Brooks about your sofa, Greenleaf Realty, Ryan Cooper about the tent and four older ones). A message is { id, from: "me" | "them", at, kind: "text" | "image" | "voice" | "offer" | "system", text?, image?, audio?: { src, peaks?, duration }, offer?: { amount, status }, status? }.
onConversationsChange(conversations: InboxConversation[]) => voidEvery change: sent and received messages, receipts, offers, unread counts, archive, mute, block, the listing's status.
conversationIdstring | nullThe open conversation, controlled; null shows Pick a conversation on desktop and the list on phones.
defaultConversationIddefault"daniel-bike"string | nullThe conversation open first while uncontrolled. Phones start on the list unless you pass it explicitly (then they open straight into it).
onConversationChange(id: string | null) => voidA conversation was opened (a row, Alt+Arrow keys) or closed (deleted, marked unread).
folderInboxFolderThe list filter, controlled: all, buying (other people's ads), selling (your ads) or unread.
defaultFolderdefault"all"InboxFolderThe list filter while uncontrolled.
onFolderChange(folder: InboxFolder) => voidThe filter tabs changed.
onThreadOpenChange(open: boolean) => voidPhones: the conversation was pushed over the list or popped back. Hide the shell's tab bar while it is open (the demo does).
medefault"Emma Carter"{ id: string; name: string; avatar?: string }You: the sender of your messages.
heightdefault"fill""fill" | "screen"fill takes what is left inside a shell with layout="fill" (flex-1); screen makes the page exactly the viewport (h-dvh) on its own.
listWidthdefault360numberThe conversation list's width in px from 768px up; the divider drags between 280 and 440.
quickRepliesdefault"["Is it still available?", "What's your best price?", "Can you deliver?"]"string[]Buying side: chips above the field while a thread is short or empty; a tap fills the field. [] hides the rail.
sellerQuickRepliesdefault"["Yes, it's available.", "The price is negotiable.", "I can ship it by courier."]"string[]The same rail on your own listings (selling side). [] hides it.
autoRepliesdefault"INBOX_SAMPLE.replies"string[]The simulated answers with autoReply, picked in turn.
offersdefaulttruebooleanThe Offer button (buying side, priced listings) and the offer cards' Accept / Decline.
autoReplydefaulttruebooleanAfter you send, the other side types for 1,5 to 3 s and answers with a canned reply; offers are accepted or countered once. Demo realism: turn it off in a real app.
sendOnEnterdefault"auto""auto" | "always" | "never"auto: Enter sends on desktop and adds a line on touch keyboards; always: Enter sends everywhere; never: Cmd/Ctrl+Enter sends. Shift+Enter always adds a line.
searchShortcutdefault""stringFocuses the list's search (mod+k notation). Empty by default: the shell's / searches the whole site.
conversationShortcutsdefaulttruebooleanAlt+Arrow up / down open the previous / next conversation while focus is inside the page.
onSend(conversationId: string, message: InboxOutgoingMessage) => (void | Promise<unknown>)Sends a text or photo message. Optimistic: the bubble shows sending, then sent, delivered and read after the reply; a rejection marks it failed with Retry. Simulated when left out.
onOffer(conversationId: string, amount: number) => (void | Promise<unknown>)Your offer from the dialog, before its card is sent through onSend. A rejection keeps the dialog open with the error.
onOfferRespond(conversationId: string, messageId: string, accepted: boolean) => (void | Promise<unknown>)Accept / Decline on an offer you received; optimistic, rolled back with a toast when it rejects.
onListingAction(conversationId: string, action: "reserve" | "unreserve" | "sold") => (void | Promise<unknown>)Your ad's actions from the pinned strip; every conversation about the same ad follows the new status.
onArchive(conversationId: string, archived: boolean) => (void | Promise<unknown>)Archive or restore (a toast offers Undo). A new message brings an archived conversation back.
onDelete(conversationId: string) => (void | Promise<unknown>)Delete after the confirmation.
onMarkUnread(conversationId: string, unread: boolean) => (void | Promise<unknown>)Mark as read or unread from the row menu.
onMute(conversationId: string, muted: boolean) => (void | Promise<unknown>)Mute or unmute the conversation's notifications.
onBlock(conversationId: string, blocked: boolean) => (void | Promise<unknown>)Block (after the confirmation) or unblock the person.
onReport(conversationId: string) => (void | Promise<unknown>)Report the person after the confirmation.
labelsdefault"DEFAULT_INBOX_PAGE_LABELS"Partial<InboxPageLabels>Every visible string, English by default (DEFAULT_INBOX_PAGE_LABELS; INBOX_PAGE_LABELS_EN is the same set under its older name). Nested sets for the composed items: price, audio, lightbox, currencyInput, avatarStatus.
localedefault"en-US"stringIntl locale for prices, times and dates.
currencydefault"USD"stringISO 4217 code of every price, offer and the offer dialog's amount.
nowdefault"useNow()"Date | numberThe reference time for Today / Yesterday, row times and last seen. The demo passes Sep 24, 2026, 4:40 PM.
tonedefault"neutral"ToneYour bubbles, the send button, the unread counts, the selected filter and the primary actions.
loadingdefaultfalsebooleanRows and bubbles as skeletons of their real shape.
animateIndefaulttruebooleanThe list and the conversation rise in once on mount; off in thumbnails and under reduced motion.
linkComponentdefault"<a>"(props: LinkComponentProps) => ReactNodeThe router link for View ad, View profile and Browse ads; defaults to the LinkProvider's (a plain anchor).
classNamestringMerged onto the root.
classNamesPartial<Record<InboxPageSlot, string>>Classes for the parts: list, row, thread, header, listing, messages, composer, empty.
Parts
DEFAULT_INBOX_PAGE_LABELS
constantEvery English string of the conversation list, the thread, offers, attachments and voice notes. Spread it and override what you translate.
INBOX_PAGE_LABELS_EN
constantAn alias of DEFAULT_INBOX_PAGE_LABELS, kept so older imports keep working.
INBOX_SAMPLE
constantThe demo content: you, the eight conversations, the automatic replies and the quick replies for buyers and sellers. Replace it with data from your API.
INBOX_SAMPLE_EN
constantThe same demo content under its older name, kept so existing imports keep working.
createInboxSample
functionBuilds the eight sample conversations about listings, with messages, offers, photos and voice notes.
withListingSold
functionReturns the conversations with one listing marked sold and a system line at the end of its thread, for the sold state.
INBOX_ME
constantThe signed in user of the sample (Emma Carter), whose messages show on the right.
INBOX_SAMPLE_IDS
constantThe ids of the sample conversations, offered by the demo's defaultConversationId control.
INBOX_VOICE_PEAKS
constantThe seeded waveform peaks of the sample voice notes.
INBOX_NOW
constantThe fixed "now" of the sample (September 24, 2026, 4:40 PM) that message times are measured from.
Examples
Selling side
Olivia Brooks asks about your sofa: answer her $160 offer, reserve the listing or mark it sold.
No conversations
The empty inbox with a way to browse listings.
Listing sold
The bike was sold: the strip greys out and the composer says so, but still sends.
Brand bubbles
tone="brand" colors your bubbles, the send button and the selected folder.
Loading
Rows and bubbles as skeletons of their real shape.
en-GB and pounds
locale="en-GB" dates and a GBP currency on the same sample.
Dependencies
Files
- components/blocks/inbox-page.tsx
- components/blocks/inbox-page-data.ts
FAQ
Is the React Inbox Page block free?
The preview, props and docs are free; copying the source needs a Pro plan. See plans.
How do I install Inbox Page?
Run npx wingo-ui@latest add inbox-page. It also adds the Wingo UI items it builds on (Alert Dialog, Audio Player, Avatar, Badge, Button and 27 more) and the npm packages motion and lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/inbox-page.
How does Inbox Page behave on phones?
On phones the conversation slides over the list; swipe from the left edge, tap the back arrow or press Escape to go back, and the list keeps its scroll.