{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "news-feed-shadcnui",
"type": "registry:component",
"title": "News Feed",
"description": "Interactive news feed with categories, search, and animated cards",
"registryDependencies": [
"button"
],
"dependencies": [
"framer-motion",
"react"
],
"files": [
{
"path": "@uitripled/react-shadcn/src/components/components/news-feed/news-feed.tsx",
"content": "\"use client\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport {\n ArrowRight,\n Bookmark,\n Clock,\n Filter,\n MessageSquare,\n MoreHorizontal,\n Newspaper,\n Search,\n Share2,\n TrendingUp,\n} from \"lucide-react\";\nimport { useState } from \"react\";\n\n// ============================================================================\n// TYPES\n// ============================================================================\n\ninterface NewsItem {\n id: string;\n title: string;\n summary: string;\n category: \"Technology\" | \"Design\" | \"Business\" | \"AI\" | \"Crypto\";\n author: {\n name: string;\n avatar: string;\n role: string;\n };\n publishedAt: string;\n readTime: string;\n likes: number;\n comments: number;\n trending?: boolean;\n image?: string;\n}\n\n// ============================================================================\n// DUMMY DATA\n// ============================================================================\n\nconst NEWS_ITEMS: NewsItem[] = [\n {\n id: \"1\",\n title: \"The Future of AI in Modern Interface Design\",\n summary:\n \"How artificial intelligence is reshaping the way we interact with digital products and the role of designers in this new era.\",\n category: \"AI\",\n author: {\n name: \"Sarah Chen\",\n avatar: \"https://i.pravatar.cc/150?u=sarah\",\n role: \"Product Designer\",\n },\n publishedAt: \"2h ago\",\n readTime: \"5 min read\",\n likes: 1240,\n comments: 86,\n trending: true,\n image:\n \"https://images.unsplash.com/photo-1677442136019-21780ecad995?auto=format&fit=crop&q=80&w=1000\",\n },\n {\n id: \"2\",\n title: \"WebAssembly: The Next Big Thing in Web Development?\",\n summary:\n \"Exploring the potential of WebAssembly to bring desktop-class performance to the web browser.\",\n category: \"Technology\",\n author: {\n name: \"Alex Rivera\",\n avatar: \"https://i.pravatar.cc/150?u=alex\",\n role: \"Senior Dev\",\n },\n publishedAt: \"4h ago\",\n readTime: \"8 min read\",\n likes: 856,\n comments: 42,\n },\n {\n id: \"3\",\n title: \"Sustainable Tech: Building Green Software\",\n summary:\n \"Why energy efficiency in code matters and how developers can contribute to a more sustainable future.\",\n category: \"Technology\",\n author: {\n name: \"Emma Wilson\",\n avatar: \"https://i.pravatar.cc/150?u=emma\",\n role: \"Tech Lead\",\n },\n publishedAt: \"5h ago\",\n readTime: \"6 min read\",\n likes: 623,\n comments: 28,\n },\n {\n id: \"4\",\n title: \"Crypto Markets See Unprecedented Growth\",\n summary:\n \"Analysis of the latest market trends and what it means for institutional investors.\",\n category: \"Crypto\",\n author: {\n name: \"Michael Chang\",\n avatar: \"https://i.pravatar.cc/150?u=michael\",\n role: \"Financial Analyst\",\n },\n publishedAt: \"6h ago\",\n readTime: \"4 min read\",\n likes: 2100,\n comments: 154,\n trending: true,\n },\n {\n id: \"5\",\n title: \"Minimalism in 2024: Less is Still More\",\n summary:\n \"A look at how minimalist design principles are evolving in the current digital landscape.\",\n category: \"Design\",\n author: {\n name: \"Jessica Kim\",\n avatar: \"https://i.pravatar.cc/150?u=jessica\",\n role: \"UX Researcher\",\n },\n publishedAt: \"8h ago\",\n readTime: \"3 min read\",\n likes: 445,\n comments: 19,\n },\n];\n\nconst CATEGORIES = [\"All\", \"Technology\", \"Design\", \"Business\", \"AI\", \"Crypto\"];\n\n// ============================================================================\n// COMPONENTS\n// ============================================================================\n\nfunction NewsCard({ item, index }: { item: NewsItem; index: number }) {\n return (\n \n {item.summary}\n \n {item.title}\n
\n
\n Stay informed with the most recent news and insights.\n
\n\n No news found matching your criteria.\n
\n \n