You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@tanstack/vue-virtual

Package Overview
Dependencies
Maintainers
2
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/vue-virtual

Headless UI for virtualizing scrollable elements in Vue

3.13.6
latest
Source
npm
Version published
Weekly downloads
435K
-18.24%
Maintainers
2
Weekly downloads
 
Created

What is @tanstack/vue-virtual?

@tanstack/vue-virtual is a Vue.js package that provides utilities for efficiently rendering large lists and grids by virtualizing the DOM. This means it only renders the visible items in the viewport, which can significantly improve performance for applications dealing with large datasets.

What are @tanstack/vue-virtual's main functionalities?

Virtualized List

This feature allows you to create a virtualized list where only the items visible in the viewport are rendered. This can greatly improve performance when dealing with large lists.


<template>
  <VirtualList :items="items" :itemSize="50">
    <template #default="{ item, index }">
      <div :key="index" class="item">
        {{ item }}
      </div>
    </template>
  </VirtualList>
</template>

<script>
import { VirtualList } from '@tanstack/vue-virtual';

export default {
  components: { VirtualList },
  data() {
    return {
      items: Array.from({ length: 10000 }, (_, i) => `Item ${i}`)
    };
  }
};
</script>

Virtualized Grid

This feature allows you to create a virtualized grid where only the cells visible in the viewport are rendered. This is useful for applications that need to display large grids of data.


<template>
  <VirtualGrid :items="items" :columnCount="3" :rowHeight="100" :columnWidth="100">
    <template #default="{ item, rowIndex, columnIndex }">
      <div :key="`${rowIndex}-${columnIndex}`" class="grid-item">
        {{ item }}
      </div>
    </template>
  </VirtualGrid>
</template>

<script>
import { VirtualGrid } from '@tanstack/vue-virtual';

export default {
  components: { VirtualGrid },
  data() {
    return {
      items: Array.from({ length: 10000 }, (_, i) => `Item ${i}`)
    };
  }
};
</script>

Other packages similar to @tanstack/vue-virtual

Keywords

react

FAQs

Package last updated on 31 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts