Skip to main content

Auto Resizing Virtual List

The Virtuoso component automatically handles any changes of the items' heights (due to content resizing, images loading, etc.) You don't have to configure anything additional.

Launch the example below in a codesanbox and resize it around.

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

export default function App() {
  return (
      style={{ height: '100%' }}
      itemContent={(index, user) => (
            backgroundColor: user.bgColor,
            padding: '1rem 0.5rem',
          <div style={{ marginTop: '1rem' }}>{user.description}</div>
    <style>{`html, body, #root { height: 100% }`}</style>