Recreate the attached design as a pixel-perfect, production-ready web page like youtube.…
- User
Recreate the attached design as a pixel-perfect, production-ready web page like youtube. Match the layout, spacing, typography, colors, and imagery exactly, and implement it with clean, semantic markup and modern CSS. Make it fully responsive across mobile, tablet, and desktop, add tasteful hover states and scroll animations that fit the design's style, and where any detail is ambiguous, make polished, on-brand decisions that elevate the original.
Assistant
Now I have a clear picture. Let me build a pixel-perfect YouTube clone. I'll start by updating the HTML title, then create all components.
Now let me create the mock video data, components, and styles all at once:
Now let me create all the components:
Now let me update the main
App.tsx:Now let me update the CSS with the required animations and base styles:
Let me build to check for errors:
Build succeeds. Now let me enhance with a mini sidebar mode (YouTube-style collapsed guide), mobile bottom nav, and search suggestions for a more polished experience:
Now let me update
App.tsxto integrate mini sidebar, mobile nav, and add search suggestions:I need to update the Header and CategoryPills to accept the new props:
Build passes! Let me fix a small responsive issue with the desktop detection:
Build succeeds. Let me do a final review of the complete App to ensure everything is cohesive:
I notice the MiniSidebar should only show when the full sidebar is collapsed on desktop. Let me fix that:
Now let me do the final build:
The build succeeds cleanly. Here's a summary of what was built:
YouTube Clone — Complete
Architecture
File Purpose src/App.tsxRoot layout, state management, responsive logic src/components/Header.tsxFixed header with hamburger, YouTube logo, search bar (with /shortcut), voice search, create, notifications (with badge), and user avatarsrc/components/Sidebar.tsxFull-width (240px) slide-out sidebar with primary nav, "You" section, and subscriptions list src/components/MiniSidebar.tsxCollapsed 72px icon-only sidebar (YouTube "guide" mode) src/components/CategoryPills.tsxHorizontally scrollable category chips with fade-edge scroll buttons src/components/VideoCard.tsxThumbnail cards with lazy-loaded images, duration badges, hover zoom + action overlays, channel info, and verified badges src/data/videos.ts12 mock videos, 14 categories, 7 subscriptions src/index.cssTailwind imports, scrollbar styling, fade-in keyframes, line clamping, selection colors Key Features
- Pixel-perfect dark theme —
#0f0f0fbackground,#272727hover states,#303030borders matching YouTube exactly - Responsive — Mobile (bottom nav), tablet (mini sidebar), desktop (full sidebar) with clean breakpoints
- Search — Real-time filtering with
/keyboard shortcut focus - Animations — Staggered fade-in on video cards, smooth sidebar transitions, thumbnail zoom on hover
- Hover states — Watch Later / Add to Queue overlays, consistent
bg-[#272727]→bg-[#3d3d3d]progression - Mobile bottom nav — 5-tab bar (Home, Shorts, Create, Subscriptions, You) hidden on
sm+ - Sidebar overlay — Semi-transparent backdrop on mobile when sidebar is open
Files built:
index.html,src/data/videos.ts,src/components/Header.tsx,src/components/Sidebar.tsx,src/components/CategoryPills.tsx,src/components/VideoCard.tsx,src/App.tsx,src/index.css,src/components/MiniSidebar.tsx- Pixel-perfect dark theme —