npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aurelia2-table

v0.0.37

Published

A port of the Aurelia Table plugin to v2

Readme

Aurelia 2 Table

A lightweight table helper for Aurelia 2 that adds client-side filtering, sorting, pagination, and row selection. This package is Aurelia 2 only (no Aurelia 1 support).

Install

npm install aurelia2-table

Register

import Aurelia from 'aurelia';
import { AureliaTableConfiguration } from 'aurelia2-table';

Aurelia
  .register(AureliaTableConfiguration)
  .app(MyApp)
  .start();

Client-side usage

<template>
  <input value.bind="filters[0].value" placeholder="Filter by name" />

  <table
    aurelia-table="data.bind: rows; display-data.two-way: displayRows; current-page.two-way: currentPage; page-size.bind: pageSize; total-items.two-way: totalItems; filters.bind: filters"
  >
    <thead>
      <tr>
        <th aut-sort="key.bind: 'name'">Name</th>
        <th aut-sort="key.bind: 'role'">Role</th>
      </tr>
    </thead>
    <tbody>
      <tr repeat.for="row of displayRows" aut-select="row.bind: row">
        <td>\${row.name}</td>
        <td>\${row.role}</td>
      </tr>
    </tbody>
  </table>

  <aut-pagination
    current-page.two-way="currentPage"
    page-size.bind="pageSize"
    total-items.bind="totalItems"
  ></aut-pagination>
</template>
export class MyApp {
  rows = [
    { name: 'Ada', role: 'Engineer' },
    { name: 'Grace', role: 'Scientist' },
    { name: 'Linus', role: 'Maintainer' },
  ];

  displayRows: Array<{ name: string; role: string }> = [];
  currentPage = 1;
  pageSize = 10;
  totalItems = 0;

  filters = [
    { value: '', keys: ['name', 'role'] }
  ];
}

Server-side usage

When data-source is set to server, the table skips client-side filtering/sorting/pagination. You can use TableSettings to drive your fetch calls.

import { TableSettings } from 'aurelia2-table';

type Row = { id: number; name: string };

export class MyApp {
  settings = new TableSettings(async (query) => {
    const response = await fetch(`/api/users?start=${query.start}&pageSize=${query.pageSize}`);
    return response.json() as Promise<{ items: Row[]; totalItems: number; draw: number }>;
  });

  async attached() {
    await this.settings.loadItems();
  }
}
<table
  aurelia-table="data-source.bind: 'server'; data.bind: settings.items"
>
  <thead>
    <tr>
      <th aut-sort="key.bind: 'name'">Name</th>
    </tr>
  </thead>
  <tbody>
    <tr repeat.for="row of settings.items">
      <td>\${row.name}</td>
    </tr>
  </tbody>
</table>

<aut-pagination
  current-page.two-way="settings.currentPage"
  page-size.two-way="settings.pageSize"
  total-items.bind="settings.totalItems"
></aut-pagination>

Notes

  • Multi-binding is supported via aurelia-table="data.bind: rows; display-data.two-way: displayRows; ...". Use bindable attribute names (kebab-case) there.
  • aut-sort adds CSS classes (aut-desc, aut-sortable, aut-asc) you can style.
  • aut-select dispatches a select event with detail.row when a row becomes selected.
  • aut-pagination dispatches page-changed with detail.currentPage whenever the page changes.
  • aurelia-table exposes api.revealItem(item) to jump to the page containing a row (client-side only).