Skip to content

TableCrafter.jsCraft Beautiful Data Tables

Advanced data table library with WordPress plugin parity - zero dependencies, mobile-first, API-ready

Quick Example

Transform your data into beautiful, interactive tables in just a few lines of code:

javascript
import TableCrafter from 'tablecrafter';

const data = [
  { id: 1, name: 'John Doe', email: 'john@example.com', role: 'Developer' },
  { id: 2, name: 'Jane Smith', email: 'jane@example.com', role: 'Designer' },
  { id: 3, name: 'Bob Johnson', email: 'bob@example.com', role: 'Manager' }
];

const table = new TableCrafter('#my-table', {
  data: data,
  columns: [
    { field: 'id', label: 'ID' },
    { field: 'name', label: 'Name', editable: true },
    { field: 'email', label: 'Email', editable: true },
    { 
      field: 'department_id', 
      label: 'Department',
      editable: true,
      lookup: {
        url: '/api/departments',
        valueField: 'id',
        displayField: 'name'
      }
    },
    { field: 'role', label: 'Role', editable: true }
  ],
  
  // Advanced filtering with auto-detection
  filters: {
    advanced: true,
    autoDetect: true,
    showClearAll: true
  },
  
  // Bulk operations
  bulk: {
    enabled: true,
    operations: ['delete', 'export', 'edit']
  },
  
  // Enhanced responsive design
  responsive: {
    fieldVisibility: {
      mobile: { showFields: ['name', 'role'] },
      tablet: { showFields: ['name', 'email', 'role'] }
    }
  },
  
  // API integration
  api: {
    baseUrl: '/api/employees',
    authentication: { type: 'bearer', token: 'jwt-token' }
  },
  
  // Permission system
  permissions: {
    enabled: true,
    edit: ['admin', 'manager'],
    delete: ['admin']
  },
  
  editable: true,
  pagination: true,
  state: { persist: true }
});

// Set user context for permissions
table.setCurrentUser({
  id: 1,
  roles: ['admin']
});

table.render();

Why TableCrafter?

Just want to try it? Skip to the Quick Start.

TableCrafter.js was built to solve the common pain points developers face when working with data tables, with complete WordPress plugin parity and advanced features:

  • WordPress Plugin Replacement: Drop-in replacement for Gravity Tables with 100% feature parity plus enhancements
  • Framework Agnostic: Works with React, Vue, Angular, WordPress, or plain HTML
  • Enterprise Ready: Role-based permissions, API integration, audit logging, and bulk operations
  • Mobile First: Advanced responsive design with expandable cards and touch optimization
  • Developer Experience: Intuitive API, comprehensive examples, and extensive customization options
  • Production Proven: Built from analysis of WordPress plugin v3.1.1 with real-world requirements

What's Next?

Community


Released under the MIT License.