Complete reference for all React components in the MemexLLM frontend.
Components are organized into three categories:
- UI Components: shadcn/ui primitives
- Feature Components: Domain-specific components
- Landing Components: Marketing page sections
Located in components/ui/. These are reusable, low-level components.
File: components/ui/button.tsx
import { Button } from "@/components/ui/button";
<Button variant="default" size="default">
Click me
</Button>Variants: default, destructive, outline, secondary, ghost, link
Sizes: default, sm, lg, icon
File: components/ui/card.tsx
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card";
<Card>
<CardHeader>
<CardTitle>Title</CardTitle>
</CardHeader>
<CardContent>Content</CardContent>
</Card>File: components/ui/dialog.tsx
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
<Dialog>
<DialogTrigger>Open</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Title</DialogTitle>
</DialogHeader>
</DialogContent>
</Dialog>File: components/ui/dropdown-menu.tsx
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
<DropdownMenu>
<DropdownMenuTrigger>Menu</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>Item 1</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>File: components/ui/input.tsx
import { Input } from "@/components/ui/input";
<Input type="text" placeholder="Enter text" />File: components/ui/switch.tsx
import { Switch } from "@/components/ui/switch";
<Switch checked={enabled} onCheckedChange={setEnabled} />File: components/ui/theme-provider.tsx
Handles dark/light mode switching.
import { ThemeProvider } from "@/components/ui/theme-provider";
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
{children}
</ThemeProvider>File: components/chat-panel.tsx
Main chat interface for notebook conversations.
Props:
interface ChatPanelProps {
messages: Message[];
sourceCount: number;
notebookId: string | null;
onSendMessage: (content: string) => void;
onOpenSettings?: () => void;
onDeleteHistory?: () => void;
onViewSource?: (documentId: string, pageNumber?: number | null) => void;
lastChatTurn?: LastChatTurn | null;
onNoteSaved?: () => void;
}Features:
- Message display with Markdown rendering
- Citation highlighting and preview
- Streaming response display
- Suggested questions
- Feedback (thumbs up/down)
- Copy message
File: components/sources-panel.tsx
Displays uploaded documents for a notebook.
Features:
- Document list with status
- Upload button
- Delete document
- Document preview
File: components/notes-panel.tsx
Rich text notes management.
Features:
- Create/edit/delete notes
- Auto-save
- Rich text editor (TipTap)
- Note list sidebar
File: components/studio-panel.tsx
AI content generation interface.
Features:
- Generate podcasts, quizzes, flashcards, mindmaps
- View generated content
- Audio player for podcasts
- Quiz interaction
- Flashcard study mode
File: components/notebook-card.tsx
Card display for notebook list.
Props:
interface NotebookCardProps {
notebook: {
id: string;
title: string;
category: string;
date: string;
sources: number;
isPublic: boolean;
};
variant?: "featured" | "recent";
onUpdate?: (id: string, newTitle: string) => void;
}Features:
- Emoji cover generation
- Inline title editing
- Delete option
- Source count display
File: components/notebook-header.tsx
Header for notebook workspace.
Features:
- Notebook title
- Settings button
- Share button
- Back navigation
File: components/add-sources-modal.tsx
Modal for adding documents from various sources.
Features:
- File upload (drag & drop)
- URL input
- YouTube link
- Processing status
File: components/citation-preview.tsx
Displays citation details on hover/click.
Props:
interface CitationPreviewProps {
citation: Citation;
onViewSource?: (documentId: string, pageNumber?: number | null) => void;
}File: components/create-notebook-modal.tsx
Modal for creating new notebooks.
Features:
- Title input
- Template selection
- Quick create
File: components/flashcard-view.tsx
Interactive flashcard study interface.
Features:
- Card flip animation
- Progress tracking
- Navigation controls
- Shuffle mode
File: components/mind-map-view.tsx
Interactive mind map visualization.
Features:
- ReactFlow-based graph
- Zoom and pan
- Node selection
- Export image
File: components/quiz-view.tsx
Interactive quiz interface.
Features:
- Multiple choice questions
- Answer selection
- Score tracking
- Review mode
File: components/audio-player-view.tsx
Audio player for generated podcasts.
Features:
- Play/pause
- Progress bar
- Speed control
- Download
File: components/resizable-panel.tsx
Draggable panel resizer for notebook layout.
Features:
- Horizontal resize
- Min/max width constraints
- Persistent sizing
File: components/neural-loader.tsx
Animated loading indicator.
File: components/theme-switcher.tsx
Dark/light mode toggle button.
Located in components/landing/.
File: components/landing/landing-nav.tsx
Navigation bar for landing page.
File: components/landing/landing-hero.tsx
Hero section with CTA.
File: components/landing/landing-features.tsx
Feature grid section.
File: components/landing/landing-how-it-works.tsx
Step-by-step explanation.
File: components/landing/landing-testimonials.tsx
User testimonials carousel.
File: components/landing/landing-pricing.tsx
Pricing plans section.
File: components/landing/landing-cta.tsx
Call-to-action section.
**