New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ngx-zen-table

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-zen-table

Lightweight infinite-scroll Angular Material table with skeleton rows, selection, and auto-fill.

latest
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

🧘‍♂️ ngx-zen-table

Lightweight infinite-scroll Angular Material table with skeleton loading, sticky headers, and row selection — built for Angular 20 and Signals.

npm Angular License: MIT

✨ Features

  • Infinite scrolling with automatic viewport fill
  • Built-in skeleton rows during loading
  • Sticky header (Material-compatible)
  • Row selection (single / multiple / select-all visible)
  • Works with Signals and OnPush / zoneless mode
  • SSR-safe & debounce-optimized
  • Minimal dependencies (only Angular + Material)

🚀 Installation

npm install ngx-zen-table

Peer dependencies required:

npm install @angular/core @angular/common @angular/material

🧩 Usage example

import { Component, signal } from '@angular/core';
import { ZenTableComponent } from 'ngx-zen-table';

@Component({
  selector: 'app-demo',
  standalone: true,
  imports: [ZenTableComponent],
  template: `
    <zen-table
      [columns]="cols"
      [fetchPage]="fetchPage"
      [selectable]="true"
      [stickyHeader]="true"
      (selectionChange)="onSelect($event)">
    </zen-table>
  `,
})
export class DemoComponent {
  cols = [
    { id: 'id', header: 'ID', width: 80, cell: (r: any) => r.id },
    { id: 'name', header: 'Name', cell: (r: any) => r.name },
  ];

  fetchPage = async ({ page, pageSize }: any) => {
    const total = 100;
    const start = page * pageSize;
    const items = Array.from({ length: Math.min(pageSize, total - start) }, (_, i) => ({
      id: start + i + 1,
      name: `Row ${start + i + 1}`,
    }));
    return { items, hasNext: start + pageSize < total };
  };

  onSelect(rows: any[]) {
    console.log('Selected rows:', rows);
  }
}

⚙️ Inputs & Outputs

InputTypeDefaultDescription
columnsZenColumn<T>[]Column definitions
fetchPage(params) => Promise<PageResult>Async page loader
pageSizeHintnumber25Initial page size
autoFillbooleantrueAuto-compute rows to fill viewport
pageSizeCapnumber200Max rows per auto-fill cycle
stickyHeaderbooleanfalseEnables sticky header
selectablebooleanfalseEnables row selection
selectionMode'single' | 'multiple''multiple'Selection mode
getRowKey(row: T) => unknownUnique key for selection
resetKeynumber0Force internal reset
selectionChangeEventEmitter<T[]>Emits current selection

🧠 Notes

  • Designed for Angular 20 / Signals.
  • Fully compatible with Angular Material themes.
  • Inline skeletons keep table height stable.
  • No dependency on CDK virtual scroll — simpler & SSR-friendly.

🪄 Roadmap

  • Sorting & filtering hooks
  • Keyboard navigation
  • cell templates
  • Expandable rows
  • Virtual scroll mode (optional CDK)

📝 License MIT © Cédric Sterkendries

Keywords

angular

FAQs

Package last updated on 26 Oct 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