Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

ag-virtual-scroll

Package Overview
Dependencies
Maintainers
0
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ag-virtual-scroll

Angular Component of virtual-scroll. It easy to use and works light and clean. He also work with differents items height.

latest
npmnpm
Version
1.20.2
Version published
Weekly downloads
1.7K
-36.01%
Maintainers
0
Weekly downloads
 
Created
Source

ag-virtual-scroll (from Angular v13 to v20+)

Angular Component of virtual-scroll. It easy to use and works light and clean. He also work with differents items height.

Use example (more examples).

<ag-virtual-scroll #vs [items]="items" height="350px" [min-row-height]="50" class="box-border">
  @for (item of vs.items; track item) {
    <div class="demo-item" *ngFor="let item of vs.items">
      <div>
        <span>{{item.id}}</span>
      </div>
      <div>
        <strong>{{item.name}}</strong><br/>
        {{item.price | currency}}
      </div>
    </div>
  }
</ag-virtual-scroll>

⚠️ Important ⚠️

  • The version 1.20.x of this lib is using standalone components, so AgVirtualScrollModule no longer exists.
  • Always wrap the repeat element with some tag (ie.: div) or ag-vs-item, per example: @for (item of vs.items; track item) { <div>...you structure of content...</div> }.
  • Define a min-row-height to increase virtualization performance.
  • Always define a height because it will be the one that will do the virtualization of the items.
  • Inform your all data list in [items].
  • Add #vs to use in iteration @for.

Usage

Install

npm install ag-virtual-scroll

Import into Module

import { AgVirtualScrollComponent, AgVsItemComponent } from 'ag-virtual-scroll';

@NgModule({
  imports: [
    ...,
    AgVirtualScrollComponent,
    AgVsItemComponent, // Optional
  ],
  declarations: [...],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

API

Inputs/Outputs (Required)

NameTypeDescription
itemsany[]Your all data list stay here.

Inputs/Outputs (Optional)

NameTypeDefaultDescription
min-row-heightnumber40This determine how minimm height each item will have.
heightstring'auto'Define a fixed height for container to make a virtual-scroll of items.
onItemsRenderEventEmitter<AgVsRenderEvent<T>>noneDefine a max width to container.

Angular version compatibility

Angular versionAgVirtualScroll version
v20v1.20.x
v18v1.9.x
v17v1.8.x
v15v1.6.x
v14v1.5.x
v13v1.4.x

FAQs

Package last updated on 03 Aug 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