Application · Community template · Complete page
Team inbox workspace
A complete team messaging page with a workspace sidebar, searchable conversations, unread filters, responsive message threads, and a host-controlled composer, adapted from Shadcn Admin.
Interactive · 1200px viewport · Scroll inside the preview
Install the complete page
One command installs the page component, its matching blocks, shared helpers, and MIT notices into your configured components directory. Prepare your existing project once, then run the page install command.
Before the first install
- 1.
Open your existing React project
Use React 19+, TypeScript/TSX, and a working Tailwind CSS 4 build. Keep the project's existing router, dependencies, and global stylesheet.
- 2.
Check components.json before installing
Reuse an existing components.json. Its aliases.components must resolve in TypeScript and the bundler, and tailwind.css must point to the stylesheet your app loads. Do not reinitialize an already configured project.
Only if components.json is missing; run inside the existing app and follow its framework setup.
npx shadcn@latest init - 3.
Include the installed sources in Tailwind
Keep the host's standard shadcn theme variables, Tailwind @theme mappings, and base border styles loaded (background, foreground, border, sidebar, and chart tokens). Ensure Tailwind scans the actual installed components directory. Restricted source(none), ignored paths, and monorepos may need an @source path relative to the stylesheet. For theme='dark', use a class-based dark variant in the host CSS.
- 4.
Import through your configured components alias
The @components/ entry is a registry target placeholder, not a JavaScript import. Replace the example's @/components prefix with components.json aliases.components, verify the file printed by the CLI, and mount it in an existing host route.
Missing styles or class-based dark mode?
Merge only the directives your Tailwind CSS 4 stylesheet needs. This source path example assumes src/styles.css and components installed under src/components; adjust it to your actual directory. Keep your host’s existing dark-mode selector and use theme="inherit", or configure this class variant when using theme="dark".
/* Example: src/styles.css */
/* Add only if this directory is outside your existing scan scope. */
@source "./components/uiblocks";
/* Required for the recipe theme="dark" class switch. */
@custom-variant dark (&:where(.dark, .dark *));Setup references: shadcn configuration · Tailwind source scanning · Dark mode
Install this page
npx shadcn@latest add https://uiblocks.org/r/recipe-team-inbox.jsonImport one component
import { useState } from "react";
import TeamInboxRecipe from "@/components/uiblocks/recipe-team-inbox/recipe-team-inbox";
export default function InboxPage() {
const [selected, setSelected] = useState<string | null>(null);
return (
<TeamInboxRecipe
mode="controlled"
brand="Your workspace"
conversations={[]}
messages={[]}
selectedConversationId={selected}
onConversationChange={setSelected}
/>
);
}The import example uses the standard @/components alias. Keep your project’s existing alias and use the installed entry printed by shadcn. Pass your own copy, links, and callbacks through the component options below.
Local interface demo · no upload or conversion
import TeamInboxRecipe from "@/components/uiblocks/recipe-team-inbox/recipe-team-inbox";
export default function InboxDemo() {
return <TeamInboxRecipe mode="demo" brand="Forma Studio" />;
}Component options and callbacks
- mode, conversations, messages
- Default controlled mode contains no people or message history. Supply conversations={id,name,subtitle?,preview,updatedAt,unread?,online?,label?} and messages={id,conversationId,body,time,direction:'incoming'|'outgoing',author?}. Times/presence remain exactly host-reported. Explicit demo mode seeds fictional records only if both arrays are omitted; explicit empty arrays remain empty.
- selectedConversationId, onConversationChange, searchQuery, onSearchChange
- Supply selection and search together with their callbacks, or allow local view state over the supplied records. Read-only controlled values do not change internally. Search and unread filtering only affect navigation, never message delivery. Mobile thread back restores keyboard focus to its conversation button.
- onSendMessage, onArchive
- Send receives {conversationId,body}; archive receives the conversation ID. Both await the host handler, prevent duplicate requests and show actual rejection text. Controlled send never appends messages or removes conversations; update authoritative props when your service accepts them. Drafts survive rejection and are stored separately per conversation. Actions without a handler are disabled. Fictional local demo records never invoke host business callbacks.
- loading, error, onRetry
- Supply actual loading/errors from your service. Retry delegates to the host and exposes rejection without inventing a successful reload. This template includes no messaging server, websocket client, authentication or automatic response.
- brand, title, description, navigation, headerSlot, footer, theme, className
- Provide your real identity, copy, normal host navigation URLs and account controls. The layout uses supplied message text without HTML injection; long text wraps within bubbles. Inherit the host theme or enable its class-based dark variant with theme='dark'.
Template source
Adapted from Shadcn Admin by Sat Naing.
MIT licensed. The original notice and adaptation record are included in the installable page bundle.
Source revision: e16c87f213a5ba5e45964e9b67c792105ec74d26
- Adapted the complete responsive chats page and its list/thread/composer hierarchy to portable React and existing Tailwind theme tokens.
- Removed application routing, auth/configuration contexts, external profile images, date parsing, and disconnected call/attachment actions.
- Added typed live conversations, host message history, controlled selection/search, pending/rejected send and archive callbacks, and per-conversation drafts.
- Kept fictional contacts and local-only messages behind explicit demo mode; no backend, automatic replies, or delivery status is simulated.
Keep the design intact
- Preserve the conversation-list/thread hierarchy, neutral surfaces, blue message accent and readable spacing. Keep preview snippets short while retaining full messages in the thread.
- Supply actual names, message times and presence. Do not infer that a person is online or that a message was delivered/read when your service does not report it.
- Connect send, archive and retry callbacks to your own messaging service; authoritative messages and conversation removal remain host-owned.
- Use mode='demo' only for fictional local inspection. A demo reply stays local and never receives an automatic fabricated response.
- Check long Chinese names/messages, empty/loading/error states, failed sends and keyboard navigation at desktop and mobile widths.
Hand this recipe to your AI assistant
Build a complete team messaging workspace using UIBlocks team-inbox, adapted from Shadcn Admin by Sat Naing. Read its get_recipe/get_preview responses, install recipe-team-inbox in one command, and mount TeamInboxRecipe in an existing host route. Keep the sidebar, searchable conversations, unread tabs, responsive thread and blue message bubbles. Use controlled mode with authoritative conversations/messages, real timestamps/presence and explicit send/archive/retry service callbacks. Do not fabricate delivery, read receipts, automatic replies or authentication. Retain MIT attribution and pinned source revision. Verify rejected callbacks, retained drafts, conversation switching, mobile Back focus, long Chinese content and host aliases.
Read the recipe JSON