Categories: CSSScriptWeb Design

Modern Data Table Library for Web Developers – TablixJS

TablixJS is a lightweight JavaScript library that creates powerful, responsive data tables with advanced pagination, selection, and data management features.

It focuses on delivering robust pagination implementation with both client-side and server-side support, plus row selection capabilities that work across different data sources and table configurations.

Key Features:

  • Pagination system: Clean separation with dedicated PaginationManager supporting both client and server-side data handling.
  • Row selection: Single and multi-row selection modes with keyboard modifiers, drag selection, and stable selection across pagination.
  • Data loading: Supports direct arrays, URL-based loading, and custom async functions for complex data scenarios.
  • Filtering system: Multi-column filtering with value-based and condition-based filter types.
  • Sorting: Auto-detection of data types with support for custom sort functions and multi-column sorting capabilities.
  • Responsive design: Mobile-friendly controls and breakpoints that adapt to different screen sizes.
  • Theming: CSS custom properties with modular styling and built-in dark theme support.
  • Events: Event hooks for state tracking and custom logic integration.

Basic Usage:

1. TablixJS uses ES6 modules, so you can import it directly into your project:

<script type="module">
  import Table from './src/core/Table.js';
</script>

2. Include the main stylesheet:

<link rel="stylesheet" href="./src/styles/tablix.css" />

3. Create an empty DIV container to hold your data table.

<div id="tableContainer"></div>

4. Initialize the data table and define your columns & data source:

const table = new Table('#tableContainer', {
  data: myData,
  columns: [
    { name: 'name', title: 'Employee Name', sortable: true },
    { name: 'department', title: 'Department', sortable: true },
    { name: 'salary', title: 'Salary', sortType: 'number', format: 'currency', currency: 'USD' },
    { name: 'joinDate', title: 'Join Date', sortType: 'date', format: 'date' }
  ],
  pagination: {
    enabled: true,
    pageSize: 10
  },
  sorting: {
    enabled: true
  },
  filtering: {
    enabled: true
  },
  selection: {
    enabled: true,
    mode: 'multi',
    dataIdKey: 'id'
  }
});

Advanced Usages:

The post Modern Data Table Library for Web Developers – TablixJS appeared first on CSS Script.

rssfeeds-admin

Share
Published by
rssfeeds-admin

Recent Posts

Peter Jackson Compares The Lord of the Rings: The Hunt for Gollum to Joaquin Phoenix’s Joker: ‘You Have to Get Inside His Head’

Peter Jackson has compared The Lord of the Rings: The Hunt for Gollum to Joaquin…

20 minutes ago

Shang-Chi Actor Tony Leung Says He ‘Argued With the Director’ About the Film Just Copying ‘Typical Kung Fu in the ’70s’

Shang-Chi and the Legend of the Ten Rings star Tony Leung says he learnt quickly…

20 minutes ago

Sustainable AI and Making Tech Work For Students

Every school year, a worrying number of students slip from “slightly behind” to “at risk,”…

1 hour ago

Chromie Health Emerges with Backing from AIX Ventures to Solve Nursing Staffing Headaches with AI

In 2024, Douglas Ford found himself in a position no one wants to be in:…

1 hour ago

What Is AI in Marketing and How Does It Actually Work?

Marketing has never moved this fast. The brands pulling ahead are not doing it with…

1 hour ago

Sustainable AI and Making Tech Work For Students

Every school year, a worrying number of students slip from “slightly behind” to “at risk,”…

1 hour ago

This website uses cookies.