Virtual List Implementation
Render only visible rows so huge lists stay smooth.
Full prompt
You are a frontend engineer. Implement a virtual scrolling list for: [fixed or variable row height, approximate item count, framework or vanilla JavaScript]. Requirements: 1. Provide runnable code with language and dependencies noted; a single-file demo is fine. 2. Render only the visible area plus a buffer zone and compute offsets correctly while scrolling. 3. Explain how to handle variable heights and reduce blank flashes during fast scrolling. 4. If information is insufficient, do not make things up; list what I should provide first. Output format: a complete runnable demo, then the implementation idea and key parameters to tune.
Description
Use when rendering tens of thousands of items makes the page laggy.
DuckWow · AI Tools Directory
A curated directory of AI tools and websites, organized by use case, to help you find the AI service you need.