A Chrome extension that enables virtual fashion try-on using FASHN AI technology. Simply hover over clothing images on any website to try them on virtually with your uploaded model image.
See the extension in action:
Try-On Button | Loading Screen | Result |
---|---|---|
![]() |
![]() |
![]() |
Hover over clothing images on any website to activate the virtual try-on feature
- Virtual Try-On: Hover over clothing images on any website to see the ๐ try-on button
- Multi-Model Support: Upload up to 4 model images for varied try-on results with carousel navigation
- Real-time Processing: Advanced AI processing with progress tracking and prediction IDs
- Universal Compatibility: Works on any e-commerce or fashion website
- High-Quality Results: Professional-grade virtual try-on powered by FASHN AI
- Modern Design: Clean, sharp rectangular design with Metrophobic typography
- Circular Try-On Button: Easy-to-recognize ๐ button that appears on hover
- Loading Animation: Beautiful loading screen with animated arrows and progress bar
- Carousel Results: Navigate through multiple try-on results with original garment reference
- Result Actions: Try Again ๐, Download Current ๐พ, and Download All ๐ฅ buttons
- Multi-Model Upload: Upload up to 4 model images (up to 5MB each, PNG/JPEG/WebP)
- API Key Management: Secure storage of your FASHN AI API key
- Settings Panel: Easy-to-use options page for configuration
- Storage Persistence: Your settings are saved across browser sessions
- Fast Development: Built with Vite, React, TypeScript, and Tailwind CSS
- Manifest V3: Latest Chrome extension standard
- CORS Handling: Robust image fetching and blob-based downloads
- Error Handling: Comprehensive error messages and retry mechanisms
- Debug Support: Built-in console logging for troubleshooting
- Node.js and npm installed
- FASHN AI API key from FASHN AI Settings
-
Clone the repository:
git clone https://github.com/parsakhaz/fashn-tryon-extension cd fashn-tryon-extension
-
Install dependencies:
npm install
-
Build the extension:
npm run build
-
Load in Chrome:
- Open
chrome://extensions/
in your browser - Enable
Developer mode
- Click
Load unpacked
and select thedist
folder
- Open
- Click the ๐ extension icon in your Chrome toolbar
- Click "Complete Setup" to open the options page
- Upload up to 4 clear, front-facing model images (max 5MB each)
- Enter your FASHN AI API key
- Save your settings
- Visit FASHN AI Settings
- Create an account or log in
- Generate your API key (format:
fa-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
) - Copy and paste it into the extension options
- Navigate to any fashion or e-commerce website
- Hover over clothing images to reveal the ๐ try-on button
- Click the try-on button to start the virtual try-on process
- Wait for the AI to process your request (typically 30-60 seconds)
- View your try-on result in the modal
- Use the action buttons:
- ๐ Try Again: Start another try-on with the same garment
- ๐พ Download: Save the result image to your computer
src/
โโโ chrome-extension/
โ โโโ popup/ # Extension popup UI
โ โโโ options/ # Settings page
โ โโโ global.css # Global styles with Metrophobic font
โ โโโ manifest.json # Extension manifest
โโโ content.ts # Content script for try-on functionality
โโโ content.css # Styles for try-on UI
โโโ background.ts # Background service worker
# Start development server with hot reload
npm run dev
# Build for production
npm run build
# Type checking
npm run type-check
- Edit source files in the
src
directory - Run
npm run build
to compile changes - Go to
chrome://extensions/
and click refresh โณ on your extension - Test your changes
- Primary:
#1A1A1A
(Dark) - Secondary:
#333333
(Medium Gray) - Background:
#FAFAFA
(Light Gray) - Success:
#0F766E
(Teal) - Warning:
#92400E
(Amber)
- Font: Metrophobic (Clean, modern sans-serif)
- Consistent font weights and letter spacing throughout
- Sharp Design: Rectangular elements with no border-radius (except try-on button)
- Circular Try-On Button: 50% border-radius for easy recognition
- Consistent Spacing: Tailwind CSS utility classes for spacing
The extension supports various FASHN AI parameters:
- Garment Photo Type: Auto-detected
- Category: Auto-detected
- Mode: Balanced (default)
- Samples: 1 result per try-on
Extension data is stored locally using Chrome's storage API:
modelImagesBase64
: Your uploaded model images (up to 4)fashnApiKey
: Your FASHN AI API key
Try-on button not appearing:
- Make sure you're hovering over actual clothing images
- Check that the extension is enabled in Chrome
- Verify your model image and API key are set
API errors:
- Verify your API key is correct and active
- Check your FASHN AI account quota
- Ensure the image URLs are accessible
Download not working:
- The extension uses blob downloads to handle CORS
- Check browser permissions for file downloads
The extension includes console logging for debugging:
- Open Developer Tools (F12)
- Check the Console tab for detailed logs
- Look for messages prefixed with "Popup:", "Options:", or "Background:"
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Build and test the extension
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- FASHN AI for providing the virtual try-on API
- Built with modern web technologies: Vite, React, TypeScript, Tailwind CSS
- Chrome Extension Manifest V3 specifications
Install the FASHN AI Try-On extension and try on clothes virtually before you buy! ๐โจ