Agent Image Editor

A sophisticated image editing interface for AI-generated images with variation management, export controls, and enhancement features.

Features

  • Image Preview: Full-featured image display with overlay controls
  • Variation Management: Create and switch between image variations
  • Export Controls: Export images in multiple formats (PNG, JPG, WebP)
  • Enhancement Tools: Adjust and enhance image quality
  • Loading States: Visual feedback during generation and processing
  • Action Controls: Copy, adjust, enhance, and regenerate options
  • Responsive Design: Adapts to different screen sizes

Examples

Basic Usage

Simple image editor with basic controls.

Variation one
Variation one
Just now
😊😔

Variations

Interactive Demo

Full-featured demo with variation switching and generation.

Original
Original
Just now
😊😔

Variations

Switch Variations:

Chat Integration

Example of how the image editor works within a chat conversation:

Image Generation Chat

Showing how the image editor works in a chat context

Can you create a landscape image for my website header?
🎨

I'll create a beautiful landscape image for your website header.

Variation one
Variation one
Just now
😊😔

Variations

Installation

npx shadcn add "https://agents-ui-kit.com/c/agent-image-editor.json"

API Reference

AgentImageEditor

PropTypeDefaultDescription
imageUrlstring-URL of the current image
variationsImageVariation[][]Array of image variations
currentVariationstring-ID of currently selected variation
isGeneratingbooleanfalseWhether image is being generated
onExport(format?: "png" | "jpg" | "webp") => void-Export callback
onCopy() => void-Copy image callback
onCreateVariation() => void-Create variation callback
onAdjust() => void-Adjust image callback
onEnhance() => void-Enhance image callback
onRegenerateResponse() => void-Regenerate callback
classNamestring-Additional CSS classes
agentAvatarstring-Agent avatar URL
timestampstring"Just now"Display timestamp

ImageVariation

PropertyTypeRequiredDescription
idstringYesUnique variation identifier
urlstringYesImage URL
labelstringYesDisplay label
timestampstringYesCreation timestamp

Export Formats

type ExportFormat = "png" | "jpg" | "webp"

The component supports exporting images in multiple formats:

  • PNG: Best for images with transparency
  • JPG: Smaller file size, good for photos
  • WebP: Modern format with excellent compression