Skip to main content

Window Scrolling

The Virtuoso and the VirtuosoGrid components can use the document scroller. This feature is a recent addition and may not work as expected in specific scenarios. If you encounter such case, please open an issue with a reproduction of it.

List attached to window scroller

import { Virtuoso } from 'react-virtuoso'
import { generateUsers } from './data'

export default function App() {
  return (
      itemContent={(index, user) => (
            backgroundColor: user.bgColor,
            padding: '1rem 0.5rem',
          <div style={{ marginTop: '1rem' }}>{user.description}</div>