Dashboard Chat App
bagui/chat-app1FreeBlock
bagUi publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by bagUi on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.bagui.pro/r/chat-app1.jsonSource
1"use client";23import { useState, useRef, useEffect } from "react";4import { motion, AnimatePresence } from "framer-motion";5import { Search, MoreVertical, Send, Plus, Smile, ChevronLeft, Image as ImageIcon, Bell, Edit3, CheckCheck } from "lucide-react";67// Type definitions8interface Message {9 id: string;10 content: string;11 sender: "me" | "other";12 timestamp: string;13 type: "text" | "images";14}1516interface Contact {17 id: string;18 name: string;19 avatar: string;20 messages: Message[];21}2223// Contact data24interface ContactData extends Contact {25 tab: "friends" | "groups";26 online: boolean;27 time: string;28 lastMessage: string;29 unread?: number;30 verified?: boolean;31 lastSeen?: string;32}3334const contacts: ContactData[] = [35 {36 id: "1",37 name: "Alice Mensah",38 avatar: "AM",39 messages: [40 { id: "1", content: "Hi! How are you?", sender: "other", timestamp: "14:30", type: "text" },41 { id: "2", content: "Very good, and you?", sender: "me", timestamp: "14:31", type: "text" },42 { id: "3", content: "Cool! Are we meeting this weekend?", sender: "other", timestamp: "14:32", type: "text" },43 ],44 tab: "friends",45 online: true,46 time: "14:32",47 lastMessage: "Are we meeting this weekend?",48 unread: 3,49 verified: true,50 },51 {52 id: "2",53 name: "Alex Chen",54 avatar: "AC",55 messages: [56 { id: "1", content: "Project finished? 📁", sender: "other", timestamp: "13:15", type: "text" },57 { id: "2", content: "Yes, it's done!", sender: "me", timestamp: "13:16", type: "text" },58 ],59 tab: "friends",60 online: true,61 time: "13:16",62 lastMessage: "Yes, it's done!",63 verified: true,64 },65 {66 id: "3",67 name: "Ivan Goldberg",68 avatar: "IG",69 messages: [70 { id: "1", content: "See you soon!", sender: "other", timestamp: "12:45", type: "text" },71 ],72 tab: "friends",73 online: false,74 time: "12:45",75 lastMessage: "See you soon!",76 lastSeen: "2h ago",77 },78 {79 id: "4",80 name: "Christina Brown",81 avatar: "CB",82 messages: [],83 tab: "friends",84 online: false,85 time: "Yesterday",86 lastMessage: "Thanks for everything!",87// … truncated
What it pulls in
npm packages
Files it writes
More from bagUi
All 25 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Contact Exemple 1contact-1 | bagUi | Blocks | Free | 2 deps | |
| Contact Exemple 2contact-2 | bagUi | Blocks | Free | 2 deps | |
| CTA Exemple 1cta-1 | bagUi | Blocks | Free | 2 deps | |
| CTA Exemple 2cta-2 | bagUi | Blocks | Free | 2 deps | |
| Modern Store Dashboarddashboard-store | bagUi | Blocks | Free | 2 deps | |
| FAQ Exemple 1faq1 | bagUi | Blocks | Free | 2 deps | |
| Feature Exemple 1feature-1 | bagUi | Blocks | Free | 2 deps | |
| Feature Exemple 2feature-2 | bagUi | Blocks | Free | 2 deps |
