Customize Rendering
The React Virtuoso component renders as several nested DIV elements. The default values in the component prop entries are div.
txtPass a custom component to the specified key in components to change rendering.
Notice that the List component must accept and pass its ref to the actual DOM element.
The example below adds borders to each customizable element.
Example with @emotion/styled
Section titled “Example with @emotion/styled”tsxTypeScript Interfaces
Section titled “TypeScript Interfaces”The types for each component are available in the Components interface. The example below annotates the Scroller custom component:
tsx