Design a Photo Slider – Frontend System Design

We’ll walk through the frontend design of a horizontally scrolling image carousel — the same slider you would pull out of an Airbnb tile and reuse full-bleed on a detail page. Our goal is index state, one visible image, two prefetch slots, and controls that work with next/prev, swipe, and keyboard without wrecking CLS or stealing the page’s vertical scroll. Put simply, the task is to design a photo slider that stays fast and accessible on every input.
This is a component interview. There is no feed service and no WebSocket. Interviewers want to hear how you reserve aspect ratio, how you lazy-load, how you lock the pointer axis after 8px, and how you label slides for a screen reader. If they ask for autoplay, you mention prefers-reduced-motion and then keep this design manual.
Problem Statement
... premium content.
