Skip to main content

Window Scrolling

The Virtuoso components can use the document scroller by setting the useWindowScroll property to true.

Live Editor
function App() {
  return (
    <Virtuoso
      useWindowScroll
      totalCount={200}
      itemContent={(index) => ( <div style={{ padding: '1rem 0.5rem' }}>Item {index}</div>)}
    />
  )
}
Result
Loading...