Skip to content

NLipatov/virtualize-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

virtualize-js

virtualize-js is a tiny and simple virtual scrolling library.

Features:

  • Variable Element Height Support: Handles items of different heights;
  • Dependency-Free: 0 external dependencies;
  • Simple API: Only one function — render.

Live demo 🚀

Installation

Install via npm:

npm install virtualize-js

Usage

Basic example:

import { render } from 'virtualize-js';

//renders items in itemsContainer
render(items, itemsContainer);

API

render(items, itemsContainer)

Renders the visible items and buffers based on scroll position.

  • items: Array of HTMLElement.
  • itemsContainer: HTMLElement (for example div) in which items should be rendered.

License

MIT License.

About

Tiny virtual scrolling library with dynamic height elements support

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors