Gathering detailed insights and metrics for vue-virtual-scroll-grid
Gathering detailed insights and metrics for vue-virtual-scroll-grid
Gathering detailed insights and metrics for vue-virtual-scroll-grid
Gathering detailed insights and metrics for vue-virtual-scroll-grid
virtua
A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue, Solid and Svelte.
@revolist/revogrid
Virtual reactive data grid spreadsheet component - RevoGrid.
@revolist/vue-datagrid
Vue 2 DataGrid Spreadsheet component with native Vue 2 render support
@revolist/vue3-datagrid
Vue 3 DataGrid Spreadsheet component with native Vue 3 cell render support
A Vue 3 component that can render a list with 1000+ items as a grid in a performant way.
npm install vue-virtual-scroll-grid
Typescript
Module System
Min. Node Version
Node Version
NPM Version
Vue (47.1%)
TypeScript (46.6%)
CSS (4.27%)
JavaScript (1.51%)
HTML (0.52%)
Total Downloads
247,220
Last Day
616
Last Week
2,420
Last Month
10,578
Last Year
156,489
MIT License
311 Stars
443 Commits
33 Forks
4 Watchers
1 Branches
6 Contributors
Updated on Apr 29, 2025
Minified
Minified + Gzipped
Latest Version
1.11.0
Package Id
vue-virtual-scroll-grid@1.11.0
Unpacked Size
665.33 kB
Size
122.87 kB
File Count
12
NPM Version
10.2.2
Node Version
20.9.0
Published on
Oct 31, 2023
Cumulative downloads
Total Downloads
Last Day
64.3%
616
Compared to previous day
Last Week
22.4%
2,420
Compared to previous week
Last Month
-40.8%
10,578
Compared to previous month
Last Year
134.8%
156,489
Compared to previous year
3
1
This is a reusable component for Vue 3 that renders a list with a huge number of items (e.g. 1000+ items) as a grid in a performant way.
1npm install vue-virtual-scroll-grid
Name | Description | Type | Validation |
---|---|---|---|
length | The number of items in the list | number | Required, an integer greater than or equal to 0 |
pageProvider | The callback that returns a page of items as a promise. pageNumber start with 0 | (pageNumber: number, pageSize: number) => Promise<unknown[]> | Required |
pageSize | The number of items in a page from the item provider (e.g. a backend API) | number | Required, an integer greater than or equal to 1 |
pageProviderDebounceTime | Debounce window in milliseconds on the calls to pageProvider | number | Optional, an integer greater than or equal to 0, defaults to 0 |
probeTag | The HTML tag used as probe element. Default value is div | string | Optional, any valid HTML tag, defaults to div |
respectScrollToOnResize | Snap to the position set by scrollTo when the grid container is resized | boolean | Optional, defaults to false |
scrollBehavior | The behavior of scrollTo . Default value is smooth | smooth | auto | Optional, a string to be smooth or auto , defaults to smooth |
scrollTo | Scroll to a specific item by index | number | Optional, an integer from 0 to the length prop - 1, defaults to 0 |
tag | The HTML tag used as container element. Default value is div | string | Optional, any valid HTML tag, defaults to div |
getKey | The :key used on each grid item. Auto-generated, but overwritable via function | (internalItem: InternalItem) => number | string 1 | Optional, any valid Function that returns a string or number |
Example:
1<Grid 2 :length="1000" 3 :pageProvider="async (pageNumber, pageSize) => Array(pageSize).fill('x')" 4 :pageSize="40" 5 :scrollTo="10" 6> 7<!-- ...slots --> 8</Grid>
There are 3 scoped slots: default
, placeholder
and probe
.
default
slotThe default
slot is used to render a loaded item.
Props:
item
: the loaded item that is used for rendering your item
element/component.index
: the index of current item within the list.style
: the style object provided by the library that need to be set on the
item element/component.Example:
1<template v-slot:default="{ item, style, index }"> 2 <div :style="style">{{ item }} {{ index }}</div> 3</template>
placeholder
slotWhen an item is not loaded, the component/element in the placeholder
slot will
be used for rendering. The placeholder
slot is optional. If missing, the space
of unloaded items will be blank until they are loaded.
Props:
index
: the index of current item within the list.style
: the style object provided by the library that need to be set on the
item element/component.Example:
1<template v-slot:placeholder="{ index, style }"> 2 <div :style="style">Placeholder {{ index }}</div> 3</template>
probe
slotThe probe
slot is used to measure the visual size of grid item. It has no
prop. You can pass the same element/component for the
placeholder
slot. If not provided, you must set a fixed height
to grid-template-rows
on your CSS grid, e.g. 200px
. If provided, make sure
it is styled with the same dimensions as rendered items in the default
or placeholder
slot. Otherwise, the view wouldn't be rendered properly, or the
rendering could be very slow.
Example:
1<template v-slot:probe> 2 <div class="item">Probe</div> 3</template>
allItems
: All items memoized by the gridThe library uses grid-auto-flow
CSS property to infer scroll mode. Set it to
column
value if you want to enable horizontal scroll.
The library does not require items have foreknown width and height, but do require them to be styled with the same width and height under a view. E.g. the items can be 200px x 200px when the view is under 768px and 300px x 500px above 768px.
Required environment variables:
VITE_APP_ID
: An Algolia app IDVITE_SEARCH_ONLY_API_KEY
: The search API key for the Algolia app abovenpm install
npm run dev
npm run lint
npm run build
npm run build -- --mode=demo
npm run serve
We use semantic-release to release the library on npm automatically.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
project is archived
Details
Reason
Found 0/14 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
26 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-04-28
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More