Make your writing shine
Our AI assistant helps you write better content, faster. Just type your draft and let the magic happen.
Smart Rewrite
Instantly improve clarity and tone.
Auto-Correction
Fix grammar and style errors on the fly.
Instant Summary
Condense long texts into key points.
Features
- ā Magic Input Simulation - Visualizes the AI "thinking" and processing content
- ā Premium Visuals - Glowing borders, glassmorphism, and subtle animations
- ā Before/After Transformation - Clearly demonstrates the value of AI enhancement
- ā Interactive Demo - Users can trigger the effect to feel the "magic"
- ā Feature Highlights - Clean list of capabilities with icons
- ā Mobile Responsive - Adapts perfectly to all screen sizes
Installation
Copy and paste the following code into your project.
"use client";
import * as React from "react";
import { motion, AnimatePresence } from "framer-motion";
import { Sparkles, Wand2, CheckCircle2, RefreshCw, Zap } from "lucide-react";
import { cn } from "@/lib/utils";
interface AIFeatureShowcaseProps {
headline?: string;
description?: string;
features?: {
title: string;
description: string;
icon: React.ElementType;
}[];
demoInput?: string;
demoOutput?: string;
className?: string;
}
export function AIFeatureShowcase({
headline = "Experience the magic of AI",
description = "Transform your workflow with intelligent automation that feels like magic.",
features = [
{
title: "Smart Rewrite",
description: "Instantly improve clarity and tone.",
icon: Wand2,
},
{
title: "Auto-Correction",
description: "Fix grammar and style errors on the fly.",
icon: CheckCircle2,
},
{
title: "Instant Summary",
description: "Condense long texts into key points.",
icon: Zap,
},
],
demoInput = "This product is good. It helps me do work faster and better.",
demoOutput = "This solution dramatically enhances productivity, streamlining workflows to deliver superior results with greater efficiency.",
className,
}: AIFeatureShowcaseProps) {
const [isGenerating, setIsGenerating] = React.useState(false);
const [showResult, setShowResult] = React.useState(false);
const [inputValue, setInputValue] = React.useState(demoInput);
const handleGenerate = () => {
if (isGenerating) return;
setIsGenerating(true);
setShowResult(false);
// Simulate AI processing
setTimeout(() => {
setIsGenerating(false);
setShowResult(true);
}, 1500);
};
const handleReset = () => {
setShowResult(false);
setInputValue(demoInput);
};
return (
<section className={cn("w-full py-12 sm:py-16 lg:py-20", className)}>
<div className="container px-4 md:px-6">
<div className="flex flex-col gap-12 lg:grid lg:grid-cols-2 lg:gap-20 lg:items-center">
{/* Left Column: Content */}
<div className="space-y-8">
<div className="space-y-4">
<div className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-3 py-1 text-sm font-medium text-primary">
<Sparkles className="mr-2 h-3.5 w-3.5 fill-primary" />
Powered by Advanced AI
</div>
<h2 className="text-3xl font-bold tracking-tighter text-foreground sm:text-4xl md:text-5xl">
{headline}
</h2>
<p className="text-lg text-muted-foreground md:text-xl">
{description}
</p>
</div>
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-1">
{features.map((feature, idx) => {
const Icon = feature.icon;
return (
<div key={idx} className="flex gap-4">
<div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary">
<Icon className="h-5 w-5" />
</div>
<div>
<h3 className="font-semibold text-foreground">
{feature.title}
</h3>
<p className="text-sm text-muted-foreground">
{feature.description}
</p>
</div>
</div>
);
})}
</div>
</div>
{/* Right Column: Interactive Demo */}
<div className="relative mx-auto w-full max-w-md lg:max-w-none">
{/* Background Glow Effects */}
<div className="absolute -right-10 -top-10 h-72 w-72 rounded-full bg-primary/20 blur-3xl" />
<div className="absolute -bottom-10 -left-10 h-72 w-72 rounded-full bg-purple-500/20 blur-3xl" />
<div className="relative overflow-hidden rounded-2xl border border-border bg-card shadow-2xl">
{/* Window Header */}
<div className="flex items-center border-b border-border bg-muted/30 px-4 py-3">
<div className="flex space-x-2">
<div className="h-3 w-3 rounded-full bg-red-500/20" />
<div className="h-3 w-3 rounded-full bg-yellow-500/20" />
<div className="h-3 w-3 rounded-full bg-green-500/20" />
</div>
<div className="ml-4 text-xs font-medium text-muted-foreground">
AI Assistant
</div>
</div>
{/* Content Area */}
<div className="p-6">
<div className="space-y-4">
<div className="space-y-2">
<label className="text-xs font-medium text-muted-foreground uppercase tracking-wider">
Input
</label>
<div className="relative">
<textarea
value={inputValue}
onChange={(e) => setInputValue(e.target.value)}
className="min-h-[100px] w-full resize-none rounded-lg border border-border bg-background p-3 text-sm text-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"
disabled={isGenerating || showResult}
/>
{isGenerating && (
<div className="absolute inset-0 flex items-center justify-center rounded-lg bg-background/50 backdrop-blur-[1px]">
<div className="flex items-center gap-2 rounded-full bg-primary/10 px-4 py-2 text-sm font-medium text-primary">
<RefreshCw className="h-4 w-4 animate-spin" />
Processing...
</div>
</div>
)}
</div>
</div>
<div className="flex justify-center">
<button
onClick={showResult ? handleReset : handleGenerate}
disabled={isGenerating}
className={cn(
"group relative inline-flex items-center gap-2 rounded-full px-6 py-2 text-sm font-semibold transition-all",
showResult
? "bg-muted text-foreground hover:bg-muted/80"
: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-lg shadow-primary/25 hover:scale-105",
)}
>
{showResult ? (
<>
<RefreshCw className="h-4 w-4" />
Reset
</>
) : (
<>
<Sparkles className="h-4 w-4" />
Enhance with AI
</>
)}
</button>
</div>
<AnimatePresence mode="wait">
{showResult && (
<motion.div
initial={{ opacity: 0, height: 0 }}
animate={{ opacity: 1, height: "auto" }}
exit={{ opacity: 0, height: 0 }}
className="overflow-hidden"
>
<div className="space-y-2 pt-2">
<label className="flex items-center gap-2 text-xs font-medium text-primary uppercase tracking-wider">
<Sparkles className="h-3 w-3" />
AI Output
</label>
<div className="relative rounded-lg border border-primary/20 bg-primary/5 p-4">
<p className="text-sm text-foreground leading-relaxed">
{demoOutput}
</p>
<div className="absolute -right-1 -top-1 h-3 w-3 rounded-full bg-primary shadow-[0_0_10px_2px_rgba(var(--primary),0.5)]" />
</div>
</div>
</motion.div>
)}
</AnimatePresence>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
);
}Use Cases
1. Code Generation & Refactoring
Perfect for developer tools, documentation sites, or API references. Show how your AI cleans up code, adds types, or generates tests.
import { Code2, FileCode, Terminal } from "lucide-react";
<AIFeatureShowcase
headline="Intelligent Code Refactoring"
description="Turn spaghetti code into clean, maintainable, and type-safe solutions in seconds."
features={[
{
title: "Auto-Refactor",
description: "Simplify complex logic automatically.",
icon: Code2,
},
{
title: "Type Safety",
description: "Add TypeScript types to plain JS.",
icon: FileCode,
},
{
title: "Documentation",
description: "Generate JSDoc comments instantly.",
icon: Terminal,
},
]}
demoInput={`function calc(x, y) {
// do math
let r = x + y;
if (r > 10) {
return r * 2;
} else {
return r;
}
}`}
demoOutput={`/**
* Calculates the result based on input threshold.
* @param {number} x - First number
* @param {number} y - Second number
* @returns {number} The calculated result
*/
function calculateResult(x: number, y: number): number {
const sum = x + y;
return sum > 10 ? sum * 2 : sum;
}`}
/>;Best for:
- Developer tools & IDEs
- Code review platforms
- API documentation sites
- Technical education platforms
2. Creative Tools & Prompt Engineering
Ideal for image generators, design tools, or writing assistants. Demonstrate how simple inputs become rich, detailed outputs.
import { Image, Palette, Wand2 } from "lucide-react";
<AIFeatureShowcase
headline="Prompt Engineering Assistant"
description="Transform simple ideas into detailed, high-fidelity image generation prompts."
features={[
{
title: "Detail Expansion",
description: "Add lighting, texture, and style details.",
icon: Image,
},
{
title: "Style Matching",
description: "Emulate specific artistic styles.",
icon: Palette,
},
{
title: "Negative Prompts",
description: "Automatically remove unwanted artifacts.",
icon: Wand2,
},
]}
demoInput="A cute cat in space"
demoOutput="Cinematic shot of an adorable scottish fold kitten floating in zero gravity inside a futuristic spaceship, bioluminescent nebula background, 8k resolution, unreal engine 5 render, soft volumetric lighting, highly detailed fur texture, wide angle lens --ar 16:9 --v 6.0"
/>;Best for:
- AI image generators (Midjourney, DALL-E, Stable Diffusion)
- Design automation tools
- Content creation platforms
- Marketing copy generators
3. Writing Enhancement
Show how your AI improves clarity, tone, and professionalism in written content.
<AIFeatureShowcase
headline="Make your writing shine"
description="Our AI assistant helps you write better content, faster."
demoInput="This product is good. It helps me do work faster and better."
demoOutput="This solution dramatically enhances productivity, streamlining workflows to deliver superior results with greater efficiency."
/>Best for:
- Email assistants
- Resume builders
- Marketing copy tools
- Academic writing aids
4. Data Analysis & Insights
Transform raw data into actionable insights with AI-powered analysis.
import { BarChart3, TrendingUp, Target } from "lucide-react";
<AIFeatureShowcase
headline="Turn data into decisions"
description="AI-powered analytics that reveal what matters most."
features={[
{
title: "Pattern Detection",
description: "Identify trends automatically",
icon: TrendingUp,
},
{
title: "Predictive Analysis",
description: "Forecast future outcomes",
icon: Target,
},
{
title: "Visual Reports",
description: "Generate charts instantly",
icon: BarChart3,
},
]}
demoInput="Sales: Q1: 45K, Q2: 52K, Q3: 48K, Q4: 61K"
demoOutput="š Strong upward trend detected (+35% YoY). Q4 shows exceptional performance with 27% growth vs Q3. Recommend increasing inventory for Q1 2024 based on seasonal patterns."
/>;Best for:
- Business intelligence platforms
- Financial analysis tools
- Marketing analytics dashboards
- E-commerce insights
5. Customer Support Automation
Showcase how AI transforms support tickets into professional, empathetic responses.
import { MessageSquare, Zap, Heart } from "lucide-react";
<AIFeatureShowcase
headline="Support that feels human"
description="AI-powered responses that customers love."
features={[
{
title: "Instant Replies",
description: "Respond in milliseconds",
icon: Zap,
},
{
title: "Empathy Engine",
description: "Understand customer emotions",
icon: Heart,
},
{
title: "Multi-language",
description: "Support 100+ languages",
icon: MessageSquare,
},
]}
demoInput="order not received, very angry!!!"
demoOutput="I sincerely apologize for the delay with your order. I understand how frustrating this must be. Let me personally track this down for you right now and ensure it's resolved within 24 hours. I've also applied a 20% discount to your next purchase as a gesture of goodwill."
/>;Best for:
- Customer service platforms
- Chatbot builders
- Help desk software
- E-commerce support
Basic Usage
import { AIFeatureShowcase } from "@/components/ui/ai-feature-showcase";
export default function Page() {
return (
<AIFeatureShowcase
headline="Experience the magic"
description="See how our AI transforms your workflow."
/>
);
}Advanced Customization
Custom Features List
import { Sparkles, Wand2, Zap } from "lucide-react";
<AIFeatureShowcase
headline="Custom AI capabilities"
description="Tailor the showcase to your specific features."
features={[
{
title: "Smart Rewrite",
description: "Instantly improve clarity and tone.",
icon: Wand2,
},
{
title: "Auto-Correction",
description: "Fix grammar and style errors on the fly.",
icon: Sparkles,
},
{
title: "Instant Summary",
description: "Condense long texts into key points.",
icon: Zap,
},
]}
/>;Industry-Specific Examples
For SaaS Products
<AIFeatureShowcase
headline="Automate your workflow"
description="Let AI handle the repetitive tasks."
demoInput="Create a task for John to review the Q3 report by Friday"
demoOutput="ā
Task created: 'Q3 Report Review'\nš¤ Assigned to: John Smith\nš
Due: Friday, Nov 24, 2023 5:00 PM\nš Reminder set for Thursday 9:00 AM\nš Q3_Report_Draft.pdf attached"
/>For E-commerce
<AIFeatureShowcase
headline="Product descriptions that sell"
description="Transform basic specs into compelling copy."
demoInput="Blue cotton t-shirt, size M, $29"
demoOutput="Elevate your everyday style with our Premium Cotton Tee in Ocean Blue. Crafted from 100% organic cotton for unmatched comfort and breathability. The relaxed fit and timeless design make it perfect for any occasion. Available in Medium. Sustainably made. $29."
/>For Healthcare
<AIFeatureShowcase
headline="Clinical notes made simple"
description="Convert conversations into structured medical records."
demoInput="Patient complains of headache for 3 days, worse in morning"
demoOutput="Chief Complaint: Headache\nDuration: 3 days\nSeverity: Moderate to severe\nTiming: Worse in morning hours\nAssociated symptoms: None reported\nRecommended: Further evaluation for tension headache vs. migraine"
/>Props Reference
| Prop | Type | Default | Description |
|---|---|---|---|
headline | string | "Experience the magic of AI" | Section headline |
description | string | "Transform your workflow..." | Section description |
features | Array<{title: string, description: string, icon: Icon}> | Default 3 features | List of features with title, description, and icon |
demoInput | string | "This product is good..." | Initial text for the input area |
demoOutput | string | "This solution dramatically enhances..." | The "enhanced" text output |
className | string | undefined | Additional CSS classes |
Integration Tips
1. Connect to Real AI
Replace the simulated processing with actual API calls:
const [isGenerating, setIsGenerating] = useState(false);
const [output, setOutput] = useState("");
const handleGenerate = async () => {
setIsGenerating(true);
const result = await fetch("/api/ai/enhance", {
method: "POST",
body: JSON.stringify({ input: inputValue }),
});
const data = await result.json();
setOutput(data.output);
setIsGenerating(false);
};2. Add Analytics Tracking
<button
onClick={() => {
handleGenerate();
trackEvent("ai_showcase_demo_clicked");
}}
>
Enhance with AI
</button>3. A/B Test Different Demos
Test which use case resonates most with your audience:
const demos = [
{ input: "...", output: "..." },
{ input: "...", output: "..." },
];
const randomDemo = demos[Math.floor(Math.random() * demos.length)];Conversion Psychology
Why this converts
- Visual Proof: Showing the AI in action (even simulated) is far more powerful than just saying "we have AI".
- Perceived Value: The "magic" effects (glows, typing) subconsciously signal a high-tech, premium product.
- Tangibility: It makes abstract AI concepts concrete by showing a specific input and output.
- Trust: High-quality UI design builds trust in the underlying technology's capability.
- Interactivity: Letting users trigger the demo creates a sense of ownership and investment.
- Before/After: The transformation clearly demonstrates ROI and value proposition.
Performance Optimization
For production use, consider:
// Lazy load the component
const AIFeatureShowcase = dynamic(
() => import("@/components/ui/ai-feature-showcase"),
{ ssr: false }
);
// Reduce motion for accessibility
const prefersReducedMotion = window.matchMedia(
"(prefers-reduced-motion: reduce)"
).matches;