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

@amiraliansaripour/data-grid

v1.0.0

Published

A powerful, feature-rich React DataTable component with TypeScript support, advanced filtering, sorting, grouping, charting, and export capabilities

Readme

React Data Grid

🚀 A powerful, feature-rich React DataTable component with TypeScript support

Created by Amirali Ansaripour

npm version License: MIT TypeScript

🌟 Overview

This library transforms complex data tables into beautiful, interactive components with advanced features like filtering, sorting, pagination, charting, and export capabilities. Built with modern React, TypeScript, and Tailwind CSS.

✨ Key Features

🎯 Core Features

  • TypeScript Support - Full type safety and IntelliSense
  • Responsive Design - Beautiful UI that works on all devices
  • Dark Mode - Built-in dark/light theme support
  • Advanced Filtering - Multiple filter types and operators
  • Multi-Column Sorting - Sort by multiple columns simultaneously
  • Pagination - Customizable pagination controls
  • Search - Global search across all columns
  • Export - Export data to Excel/PDF formats

🚀 Advanced Features

  • Chart Integration - Ready for chart library integration
  • Row Selection - Multi-select with checkbox support
  • Column Visibility - Show/hide columns dynamically
  • Data Grouping - Group data by any column
  • Statistics - Automatic numeric column calculations
  • Custom Rendering - Custom cell renderers and formatters
  • Row Actions - Dropdown actions for each row
  • Performance Optimized - Efficient rendering with animations

🌍 Persian/RTL Support

  • Persian Language - Full Persian UI support
  • RTL Layout - Right-to-left layout
  • Persian Numbers - Automatic Persian number formatting
  • Persian Dates - Persian date formatting

🚀 Quick Start

Installation

npm install @amiraliansaripour/data-grid

Basic Usage

import { DataTable } from '@amiraliansaripour/data-grid';
import '@amiraliansaripour/data-grid/styles';

const columns = [
  { accessor: 'name', header: 'Name', sortable: true },
  { accessor: 'email', header: 'Email' },
  { accessor: 'age', header: 'Age', type: 'number' }
];

const data = [
  { name: 'John Doe', email: '[email protected]', age: 30 },
  { name: 'Jane Smith', email: '[email protected]', age: 25 }
];

function App() {
  return (
    <DataTable 
      data={data} 
      columns={columns}
      searchable
      exportable
      pagination={{ pageSize: 10 }}
    />
  );
}

📖 Documentation

Column Configuration

interface DataTableColumn<T> {
  accessor: keyof T | string;     // Data property key
  header: string;                 // Column header text
  type?: 'text' | 'number' | 'date' | 'boolean';
  sortable?: boolean;             // Enable sorting
  width?: string | number;        // Column width
  formatter?: (value: any) => string;
  render?: (value: any, row: T) => ReactNode;
  className?: string;             // Custom CSS classes
  hidden?: boolean;               // Initially hidden
}

Props

interface DataTableProps<T> {
  data: T[];                      // Array of data objects
  columns: DataTableColumn<T>[];  // Column definitions
  
  // Search & Filter
  searchable?: boolean;           // Enable global search
  searchPlaceholder?: string;     // Search input placeholder
  
  // Pagination
  pagination?: {
    pageSize?: number;            // Items per page
    showPageSizeSelector?: boolean;
    pageSizeOptions?: number[];
  };
  
  // Selection
  selectable?: boolean;           // Enable row selection
  onSelectionChange?: (selectedRows: T[]) => void;
  
  // Export
  exportable?: boolean;           // Enable export buttons
  
  // Styling
  className?: string;             // Custom CSS classes
  theme?: 'light' | 'dark';      // Theme mode
  
  // Events
  onRowClick?: (row: T) => void;  // Row click handler
  onSort?: (column: string, direction: 'asc' | 'desc') => void;
}

🛠️ Development

Setup

git clone https://github.com/Amiraliansaripour/data-grid.git
cd data-grid
npm install

Available Scripts

npm run dev          # Start development server
npm run build        # Build for production
npm run test         # Run tests
npm run lint         # Run ESLint
npm run type-check   # TypeScript type checking

Project Structure

src/
├── components/
│   ├── DataTable/          # Main table component
│   └── ChartModal/         # Chart visualization modal
├── hooks/                  # Custom React hooks
├── types/                  # TypeScript definitions
├── utils/                  # Utility functions
└── index.ts               # Main exports

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick Contribution Steps

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support


Made with ❤️ by Amirali Ansaripour