Streamlined Frontend Prompt: Telegram-Style Chat UI with React
Project Title: Telegram UI Clone (React Frontend)
Objective
Build a pixel-perfect, responsive Telegram UI clone using React that implements all major client-side features with mock data. Focus exclusively on frontend implementation with realistic interactions.
I. Core Technologies
- React 18+ (Functional Components with Hooks)
- TypeScript (Strict typing)
- State Management: Zustand (lightweight) or Jotai
- Routing: React Router v6
- Styling: Tailwind CSS + Headless UI for components
- Icons: React Icons (Lucide icon set)
- Emoji/Stickers:
emoji-mart library
- Drag & Drop:
react-dnd
- Virtualization:
react-virtuoso for chat scrolling
- Animation: Framer Motion
II. UI Components Structure
-
Authentication Screens (Simulated)
- Login with phone number/email UI
- Verification code input
- Profile setup wizard
-
Main App Layout
<App>
<SidebarPanel /> // Left drawer
<ChatContainer /> // Main chat area
<InfoPanel /> // Right drawer (optional)
</App>
- Sidebar Components
- Search bar with filters (chats/contacts/media)
- Chat list with sections (Pinned, Recent)
- Floating action button (New Chat/Group)
- Collapsible folder system
III. Core UI Features
A. Chat Interface
-
Message Types:
- Text with formatting (bold, italic, links)
- Media (images/videos with carousel previews)
- Files with progress indicators
- Voice messages with waveform visualization
- Polls and quizzes
- Location sharing previews
-
Message Interactions:
- Context menu (Reply/Edit/Delete/Pin/React)
- Emoji reactions bar (floating under messages)
- Reply threads with nested view
- Forwarding preview interface
- Message selection mode (checkboxes)
-
Chat Header:
- Contact/group name and avatar
- Online status/subtitle
- Call/video call buttons
- Search within chat toggle
- More options menu
B. Input Area
-
Composer Features:
- Formatting toolbar (B/I/~~/```/link)
- Emoji/sticker/gif pickers
- Attachment menu (photo/file/location/poll)
- Voice message recorder with cancel/done
- Send button states (active/loading)
-
Special States:
- "Editing message" mode
- "Replying to" preview bar
- Slow mode countdown indicator
C. Group & Channel UI
-
Group Features:
- Admin badges in member list
- Permissions editor (mock interface)
- Member management with roles
- Invite link generator UI
-
Channel Specifics:
- Subscriber count display
- Admin broadcast indicators
- Silent message toggle
IV. Special UI Systems
-
Notifications:
- Desktop notification previews
- Unread badge system (chats/app icon)
- Mute status indicators
-
Animations:
- Message send/receive transitions
- Chat switching animations
- Sticker/gif animations
- Typing indicator pulses
-
Theming:
- Light/dark mode toggle
- Chat wallpaper selector
- Accent color customization
-
Responsive Behavior:
- Mobile: Single-column view
- Tablet: Split-view layout
- Desktop: Three-column layout
V. Mock Data Structure
// Example data structure
interface Chat {
id: string;
type: 'private' | 'group' | 'channel';
name: string;
avatar?: string;
lastMessage?: Message;
unreadCount: number;
isPinned: boolean;
muted: boolean;
}
interface Message {
id: string;
senderId: string;
content: string | MediaContent | FileContent | PollContent;
timestamp: Date;
status: 'sending' | 'sent' | 'read';
isEdited?: boolean;
replyTo?: string;
reactions: Record<string, number>; // { 😂: 3, ❤️: 1 }
}
VI. Implementation Requirements
-
Performance:
- Virtualized chat message lists
- Memoized components
- Lazy-loaded media
-
Accessibility:
- Keyboard navigation support
- ARIA labels for icons
- Contrast-compliant colors
-
UI Fidelity:
- Match Telegram's spacing (8px grid)
- Recreate iconography precisely
- Implement all interaction states
-
Simulated Interactions:
- Mock message sending with loading states
- Fake typing indicators
- Simulated online status changes
VII. Deliverables
-
Complete React application with:
- Authentication flow screens
- Main chat interface
- Group/channel management UIs
- Settings panels
-
Showcase these features:
[✓] Message bubbles with reactions
[✓] Media gallery with carousel
[✓] Animated voice message player
[✓] Interactive context menus
[✓] Theming system switcher
[✓] Responsive layout variants
- Include sample mock data for:
- 10 chat threads (mix of types)
- 50+ sample messages
- 5 users with avatars
VIII. Quality Standards
- No console errors/warnings
- Pixel-perfect matching to Telegram's UI
- Smooth 60fps animations
- Comprehensive TypeScript typings
- Mobile-friendly touch targets
- Clean component organization
This prompt focuses exclusively on building a production-ready Telegram UI clone with realistic interactions using modern React patterns. All backend dependencies are simulated through mock data and state management.