Role: Senior UI/UX Designer & Lead Frontend Engineer (Expert in SVG manipulation and…
- User
Role: Senior UI/UX Designer & Lead Frontend Engineer (Expert in SVG manipulation and Character Creators).
Objective: Build a comprehensive, professional-grade Avatar Editor web application. The design must be ultra-clean, minimalist, and "Apple-level" smooth.
Visual Style:
- Character Aesthetic: Modern, high-end vector style (similar to Memoji or Notion). Use high-fidelity gradients, soft shadows, and precise line weights.
- Preview: Large, centered real-time character preview on a signature lavender background (#D1BCFF).
- Control UI: A clean, bottom-sheet or sidebar interface using custom-themed tabs and high-quality selection grids.
Technical Architecture (Mandatory):
- Layered SVG Engine: The avatar must be a single composed of perfectly aligned, stacked (group) layers. - Layers MUST follow this Z-index order: Background Circle -> Body/Clothing -> Neck -> Face Shape -> Ears -> Brows -> Eyes -> Nose -> Lips -> Hair.
- State Logic: Use a React/Vue state object to manage: - colors: { skin, hair, eyes, clothes } (Hex values). - shapes: { bodyType, faceType, hairType, eyeType, noseType, lipType, browType }.
Required Features (A to Z):
- Complete Asset Library: Provide actual SVG path data for 10+ variations in EVERY category: - Body: Different outfits and poses. - Face: Round, oval, square, heart-shaped, etc. - Eyes: Various shapes and expressions (happy, closed, large, focused). - Hair: Spiky, bob, long, short, curly, bald (10+ unique styles). - Details: Noses, eyebrows, and lip expressions (smile, smirk, flat).
- Dynamic Tinting Engine: Every SVG layer must react to the state. Use fill={state.colors.hair} etc.
- Animation: Use Framer Motion or GSAP for "organic" transitions when switching parts (subtle scale-up/fade effect).
- UX Details: A tabbed navigation system with icons for each category.
The Implementation: Provide the full functional code (React/Tailwind preferred) that includes the SVG path definitions and the rendering logic. Do not use generic placeholders; provide a fully workable character creation engine where every click results in a visual change. use html and css.
Assistant
I will explore the workspace to understand the project structure and installed packages.
I will read
package.jsonto inspect the installed dependencies.I will install
lucide-react,framer-motion, andcanvas-confetti(with@types/canvas-confetti).I will check
index.htmlandsrc/index.css.I will check
src/index.css.I will create
src/types/avatar.tscontaining the data models for the avatar state, category types, color definitions, and configuration options.I will create
src/constants/palettes.tswith color palettes and styling presets.I will create
src/constants/presets.tswith default avatar configurations and pre-designed characters.I will create
src/components/svg-layers/BackgroundPaths.tsxfor rendering various backgrounds and gradients.I will create
src/components/svg-layers/FacePaths.tsxfor face shapes, neck geometry, ears, and cheek blush.I will create
src/components/svg-layers/BrowPaths.tsxwith 10+ eyebrow variations.I will create
src/components/svg-layers/EyePaths.tsxwith 12+ eye variations, iris tinting, specular glints, and pupil tracking support.I will create
src/components/svg-layers/NosePaths.tsxwith 10+ nose variations.I will create
src/components/svg-layers/LipPaths.tsxwith 10+ expressive mouth and lip variations.I will create
src/components/svg-layers/BeardPaths.tsxfor facial hair and beards.I will create
src/components/svg-layers/HairPaths.tsxwith 14+ detailed hairstyle variations.I will create
src/components/svg-layers/BodyPaths.tsxwith 12 distinct outfits and clothing variations.I will create
src/components/svg-layers/GlassesPaths.tsxwith 10 glasses and eyewear variations.I will create
src/components/svg-layers/AccessoryPaths.tsxwith 12 distinct accessories, hats, headwear, and jewelry.I will create
src/components/AvatarRenderer.tsximplementing the single<svg>layered engine with gradients, filters, Framer Motion transitions, and pupil tracking.I will create
src/utils/svgExport.tsfor rasterizing and downloading avatars as high-resolution PNGs (up to 4K), downloading SVG vector files, and copying raw SVG markup.I will create
src/utils/randomizer.tswith smart random avatar generator logic.I will create
src/components/ColorPicker.tsxfor color swatch selection and custom HEX input.I will create
src/components/ControlPanel.tsxcontaining the Apple-styled customization panel with tabbed navigation, rich option grids, sliders, and color controls.I will create
src/components/Header.tsxwith actions for undo, redo, presets gallery, saved drawer, profile card maker, and export.I will create
src/components/ExportModal.tsxfor exporting avatars in various vector and raster formats.I will remove the unused
Copyimport insrc/components/ExportModal.tsx.I will create
src/components/PresetsModal.tsxfor exploring and applying ready-made character personalities.I will create
src/components/ProfileCardModal.tsxfor generating and downloading persona ID cards.I will create
src/components/SavedAvatarsDrawer.tsxfor managing saved local characters.I will write
src/App.tsxbringing together the state management, undo/redo history, interactive preview canvas, control panel, and all modals.I will remove the unused
Reactimport insrc/App.tsx.I will update
index.htmlto provide an appropriate title, Google fonts (Inter, Plus Jakarta Sans), and styling.I will update
src/index.csswith clean utility classes and font declarations.I will build the project to verify that there are no compilation or type errors.
I will run
build_projectone last time to ensure the build remains clean and verified.I have built PersonaStudio, a comprehensive, professional-grade Avatar Editor web application crafted with Apple-level aesthetic refinement, smooth physics, and a robust layered SVG engine.
What Was Built:
-
Layered SVG Vector Engine (
<svg>+ Stacked<g>Hierarchy):- Built an SVG canvas engine strictly following the required Z-index hierarchy:
- Background Backdrop / Radial Glow / Badges
- Body & Clothing
- Neck & Soft Ambient Occlusion Shadows
- Face Contour Geometry & Cheeks Blush
- Ears & Inner Cartilage
- Facial Hair / Beards & Stubbles
- Eyebrows
- Eyes, Pupils, Lashes & Specular Highlights
- Nose Contours & Piercings
- Lips, Teeth, Tongue & Glossy Sheens
- Hairstyles & Dynamic Highlights
- Glasses & Eyewear
- Hats, Headwear, AirPods & Accessories
- Apple Ambient Specular Glass Sheen Overlay
- Built an SVG canvas engine strictly following the required Z-index hierarchy:
-
Complete Vector Asset Library (10+ Variations in Every Category):
- Body (12 styles): Cozy Hoodie, Casual T-Shirt, Executive Suit & Silk Tie, Cupertino Turtleneck, Denim Jacket, Polo Shirt, Bomber Jacket, Knit Cardigan, Athletic Tank Top, Wool Overcoat, Sweatshirt, Sci-Fi Tech Suit.
- Face (10 shapes): Smooth Oval, Round Chubby, Sculpted Square, Heart Shaped, Diamond, Rectangle, Chubby Cheeks, Sharp Angular, Pear Shaped, Sleek Elongated.
- Eyes (12 expressions): Classic Gaze, Sparkle Anime, Cheerful Crescent, Focused, Almond Elegant, Serene Zen, Winged Cat-Eye, Sleepy Chill, Wide Wonder, Playful Wink, Determined, Starry Eyed.
- Hair (14 styles): Pompadour, Sleek Bob with Fringe, Long Wavy, Urban Spiky, Curly Afro, Slick Back, Top Knot Bun, Buzz Fade, Feathered Pixie, Box Braids with Golden Beads, Side Part, Shaggy Surfer, Dreadlocks, Clean Shaved.
- Eyebrows (10 styles): Natural Arch, Thick Fluffy, Sharp Angular, Inquiring Raised, Confident, Straight Minimal, Urban Slit Cut, Soft Rounded, Refined Thin, Curved.
- Nose (10 styles): Cute Button, Straight Greek, Tiny Dot Cute, Wide Rounded, Aquiline, Minimalist Dot, Snub Upturned, Pierced with Gold Stud, Roman Angular, Gloss Highlighted.
- Lips & Expressions (10 styles): Warm Smile, White Teeth Smile, Cool Smirk, Flat Chill, Joyous Laugh, Full Glossy Pout, Gentle Closed, Surprised "O", Confident Grin, Playful Tongue Out.
- Facial Hair (10 styles): Clean Shaven, 5 O'Clock Stubble, Full Nordic Beard, Goatee, Dapper Mustache, Anchor Beard, French Van Dyke, Soul Patch, Horseshoe Mustache, Heavy Shadow.
- Glasses (10 styles): None, Classic Wayfarer, Steve Jobs Round Wire, Aviators, Retro Cat-Eye, Square Chunky, Gold Monocle with Chain, Cyber Visor, 90s Matrix Oval, Rimless Titanium.
- Accessories & Headwear (12 styles): None, Apple AirPods Pro, Gold Hoops, Knit Beanie, Baseball Cap, Bucket Hat, DJ Over-Ear Headphones, Sakura Flower Pin, Star Stickers, Nose Band-Aid, Golden Halo Crown, French Beret.
- Backdrop (11 styles): Signature Lavender, Radial Halo, Badge Rings, Sunset Gradient, Mint Blossom, Sky Azure, Peach Dream, Tokyo Cyber Mesh, Floating Shapes, Dark Obsidian, Transparent.
-
Dynamic Reactive Tinting Engine:
- Every path element is reactively bound to state colors with custom color swatch palettes and native HTML5 HEX color picker + direct hex input for Skin, Hair, Eyes, Clothes, Accents, Lips, Eyewear, and Accessories.
-
Apple-Grade Smooth UX & Organic Animations:
- Framer Motion spring physics for seamless layer transitions when selecting styles.
- Interactive Live Cursor Eye Tracking: character pupils smoothly follow the user's cursor across the screen.
- Blink & Cheer Triggers: interactive buttons for winks and celebratory bounces.
- Full History Stack: Undo & Redo functionality with keyboard shortcut support (
Ctrl+Z,Ctrl+Y). - Smart Harmonic Randomizer: algorithmic character generation with matching color harmony and celebratory confetti.
-
Export & Sharing Suite:
- High-Resolution PNG Export (1x 512px, 2x 1024px HD, 4x 2048px Ultra-4K).
- Vector SVG (.svg) File Download.
- Copy Raw SVG Code with 1-click clipboard integration and toast feedback.
- Persona Pass Generator: Apple Wallet / WWDC style Digital ID card maker with custom Name, Role, Handle, Bio, and QR badge.
- Saved Characters Library: store and manage custom avatar designs in browser
localStorage. - Curated Presets Gallery: 8+ ready-to-use persona archetypes.
Files built:
src/types/avatar.ts,src/constants/palettes.ts,src/constants/presets.ts,src/components/svg-layers/BackgroundPaths.tsx,src/components/svg-layers/FacePaths.tsx,src/components/svg-layers/BrowPaths.tsx,src/components/svg-layers/EyePaths.tsx,src/components/svg-layers/NosePaths.tsx,src/components/svg-layers/LipPaths.tsx,src/components/svg-layers/BeardPaths.tsx,src/components/svg-layers/HairPaths.tsx,src/components/svg-layers/BodyPaths.tsx,src/components/svg-layers/GlassesPaths.tsx,src/components/svg-layers/AccessoryPaths.tsx,src/components/AvatarRenderer.tsx,src/utils/svgExport.ts,src/utils/randomizer.ts,src/components/ColorPicker.tsx,src/components/ControlPanel.tsx,src/components/Header.tsx,src/components/ExportModal.tsx,src/components/PresetsModal.tsx,src/components/ProfileCardModal.tsx,src/components/SavedAvatarsDrawer.tsx,src/App.tsx,index.html,src/index.css-
- User
Body, Face, Eyes, Brow, Nose, Lips, Hair, Facial Hair, Beard, Glasses, Shirt, Pets, Accessory, Hats, Background
Assistant
I will update
src/types/avatar.tsto add dedicated types forShirt,Pets,Hats,Accessory,FacialHair, and expanded categories as requested.I will create
src/components/svg-layers/PetPaths.tsxwith 10+ companion pets: cute orange tabby cat, shiba inu dog, cyber drone, baby dragon, white bunny, capybara with orange, spooky ghost, parrot, tiny hamster, and neon pixie.I will create
src/components/svg-layers/HatPaths.tsxwith 11+ dedicated hats and headwear.I will update
src/components/svg-layers/AccessoryPaths.tsxwith dedicated accessories: Gold Chain Necklace, Pearl Necklace, AirPods, DJ Headphones, Gold Hoops, Scarf, Bowtie, Sakura Pin, Star Stickers, Nose Band-Aid, and Face Mask.I will create
src/components/svg-layers/ShirtPaths.tsxfor rendering the 14 clothing/shirt choices.I will update
src/components/svg-layers/BodyPaths.tsxfor body postures, hand gestures, and shoulder silhouettes.I will update
src/constants/palettes.tsto include color options for Hats and Pets.I will update
src/components/AvatarRenderer.tsxto stack all 15 layers including Body pose, Shirt, Pets, Hats, and Accessories.I will update
src/constants/presets.tswith all the new shapes and colors.I will update
src/utils/randomizer.tswith options for all the categories.I will update
src/components/ControlPanel.tsxwith all 14 requested category tabs in order: Body, Face, Eyes, Brow, Nose, Lips, Hair, Facial Hair / Beard, Glasses, Shirt, Pets, Accessory, Hats, Background, and Settings/Tune.I will remove the unused
Crownimport insrc/components/ControlPanel.tsx.I will update
src/App.tsxto set the default initial tab to'body'.Now I will build the project to verify that all TypeScript types, layers, tabs, and components build cleanly.
I have updated the application to fully support and organize all requested categories:
Updated Category Architecture:
- Body (10 Poses & Silhouettes): Standard Bust, Waving Hand, Peace Sign (V-pose), Barista Coffee Mug with steam, Coder Laptop with code lines, Thumbs Up, Relaxed Sloped, Athletic Broad, Slender Frame, Crossed Arms.
- Face (10 Vector Shapes): Smooth Oval, Round Cute, Sculpted Square, Heart Shaped, Diamond, Rectangle, Chubby Cheeks, Sharp Angular, Pear Shaped, Sleek Elongated.
- Eyes (12 Expressions with Live Eye-Tracking): Classic Gaze, Sparkle Anime, Cheerful Crescent, Focused, Almond Elegant, Serene Zen, Winged Cat-Eye, Sleepy Chill, Wide Wonder, Playful Wink, Determined, Starry Eyed.
- Brow (10 Shapes): Natural Arch, Thick Fluffy, Sharp Angular, Inquiring Raised, Confident, Straight Minimal, Urban Slit Cut, Soft Rounded, Refined Thin, Curved.
- Nose (10 Contours): Cute Button, Straight Greek, Tiny Dot Cute, Wide Rounded, Aquiline, Minimalist Dot, Snub Upturned, Pierced with Gold Ring Stud, Roman Angular, Gloss Highlight.
- Lips (10 Expressions): Warm Smile, White Teeth Smile, Cool Smirk, Flat Chill, Joyous Laugh, Full Glossy Pout, Gentle Closed, Surprised "O", Confident Grin, Playful Tongue Out.
- Hair (14 Styles): Pompadour, Sleek Bob with Fringe, Long Wavy, Urban Spiky, Curly Afro, Slick Back, Top Knot Bun, Buzz Fade, Feathered Pixie, Box Braids with Golden Beads, Side Part, Shaggy Surfer, Dreadlocks, Clean Shaved.
- Facial Hair / Beard (10 Styles): Clean Shaven, 5 O'Clock Stubble, Full Nordic Beard, Goatee, Dapper Mustache, Anchor Beard, French Van Dyke, Soul Patch, Horseshoe Mustache, Heavy Shadow.
- Glasses (10 Eyewear Types): None, Classic Wayfarer, Steve Jobs Round Wire, Aviators with Double Bridge, Retro Cat-Eye, Square Chunky, Gold Monocle with Chain, Cyber Visor, 90s Matrix Oval, Rimless Titanium.
- Shirt (14 Outfits): Cozy Hoodie, Casual T-Shirt, Executive Suit & Silk Tie, Cupertino Turtleneck, Denim Jacket, Polo Shirt, Bomber Jacket, Knit Cardigan, Athletic Tank Top, Wool Overcoat, Sweatshirt, Sci-Fi Tech Suit, Hawaiian Resort, Silk Kimono with Obi Sash.
- Pets (10 Cute Animal & Cyber Companions): None, Tabby Cat on shoulder, Shiba Inu Dog with red bandana, Floating Cyber Optical Drone, Baby Green Dragon with horns, Fluffy White Bunny, Zen Capybara with yuzu orange on head, Spooky Floating Ghost, Scarlet Jungle Parrot, Tiny Hamster with sunflower seed, Neon Fairy Pixie with sparkle dust.
- Accessory (12 Items): None, Apple AirPods Pro, Gold Hoops, DJ Over-Ear Headphones, Cuban Gold Chain Necklace, Pearl Strand, Cozy Winter Scarf with fringe, Formal Bowtie, Sakura Cherry Blossom Pin, Star Cheek Decals, Heart Nose Band-Aid, Medical/Tech Face Mask.
- Hats (11 Dedicated Headwear): None, Knit Beanie with pom-pom, Snapback Baseball Cap, Stitched Bucket Hat, French Artist Beret, Imperial Golden Crown with gems, Cowboy Stetson, Classic Victorian Top Hat, Chef Toque, Striped Party Cone, Straw Sun Hat with red ribbon, Cyber Astronaut Space Helmet.
- Background (11 Backdrops): Signature Lavender, Radial Halo Glow, Badge Rings, Sunset Gradient, Mint Blossom, Sky Azure, Peach Dream, Tokyo Cyber Mesh, Floating Confetti Shapes, Dark Obsidian, Clean Transparent.
Files built:
src/types/avatar.ts,src/components/svg-layers/PetPaths.tsx,src/components/svg-layers/HatPaths.tsx,src/components/svg-layers/AccessoryPaths.tsx,src/components/svg-layers/ShirtPaths.tsx,src/components/svg-layers/BodyPaths.tsx,src/constants/palettes.ts,src/components/AvatarRenderer.tsx,src/constants/presets.ts,src/utils/randomizer.ts,src/components/ControlPanel.tsx,src/App.tsx
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.