"use client"; import { Zap, Cloud, GitBranch, Palette } from "lucide-react"; interface ExampleCardProps { icon: React.ReactNode; title: string; description: string; onClick: () => void; } function ExampleCard({ icon, title, description, onClick }: ExampleCardProps) { return ( ); } export default function ExamplePanel({ setInput, setFiles, }: { setInput: (input: string) => void; setFiles: (files: File[]) => void; }) { const handleReplicateFlowchart = async () => { setInput("Replicate this flowchart."); try { const response = await fetch("/example.png"); const blob = await response.blob(); const file = new File([blob], "example.png", { type: "image/png" }); setFiles([file]); } catch (error) { console.error("Error loading example image:", error); } }; const handleReplicateArchitecture = async () => { setInput("Replicate this in aws style"); try { const response = await fetch("/architecture.png"); const blob = await response.blob(); const file = new File([blob], "architecture.png", { type: "image/png", }); setFiles([file]); } catch (error) { console.error("Error loading architecture image:", error); } }; return (
{/* Welcome section */}

Create diagrams with AI

Describe what you want to create or upload an image to replicate

{/* Examples grid */}

Quick Examples

} title="Animated Diagram" description="Draw a transformer architecture with animated connectors" onClick={() => setInput("Give me a **animated connector** diagram of transformer's architecture")} /> } title="AWS Architecture" description="Create a cloud architecture diagram with AWS icons" onClick={handleReplicateArchitecture} /> } title="Replicate Flowchart" description="Upload and replicate an existing flowchart" onClick={handleReplicateFlowchart} /> } title="Creative Drawing" description="Draw something fun and creative" onClick={() => setInput("Draw a cat for me")} />

Examples are cached for instant response

); }