shadcn-table

Shadcn table with server-side sorting, filtering, and pagination.
GitHub
5.15k
Created 2 years ago, last commit 5 days ago
27 contributors
1.12k commits
Stars added on GitHub, month by month
7
8
9
10
11
12
1
2
3
4
5
6
2024
2025
Stars added on GitHub, per day, on average
Yesterday
+7
Last week
+4.1
/day
Last month
+4.0
/day
Last 12 months
+8.3
/day
README

This is a shadcn table component with server-side sorting, filtering, and pagination. It is bootstrapped with create-t3-app.

Shadcn Table

Vercel OSS Program

Documentation

See the documentation to get started.

Tech Stack

Features

  • Server-side pagination, sorting, and filtering
  • Customizable columns
  • Auto generated filters from column definitions
  • Dynamic Data-Table-Toolbar with search, filters, and actions
  • Notion/Airtable like advanced filtering
  • Linear like filter menu for command palette filtering
  • Action bar on row selection

Running Locally

Quick Setup (with docker)

  1. Clone the repository

    git clone https://github.com/sadmann7/shadcn-table
    cd shadcn-table
  2. Copy the environment variables

    cp .env.example .env
  3. Run the setup

    pnpm ollie

    This will install dependencies, start the Docker PostgreSQL instance, set up the database schema, and seed it with sample data.

Manual Setup

  1. Clone the repository

    git clone https://github.com/sadmann7/shadcn-table
    cd shadcn-table
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    cp .env.example .env

    Update the .env file with your database credentials.

  4. Choose your database approach:

    Option A: Use Docker PostgreSQL

    # Start PostgreSQL container
    pnpm db:start
    
    # Set up database schema and seed data
    pnpm db:setup
    
    # Start development server
    pnpm dev

    Option B: Use existing PostgreSQL database

    # Update .env with your database URL
    # Then set up database schema and seed data
    pnpm db:setup
    
    # Start development server
    pnpm dev

How do I deploy this?

Follow the deployment guides for Vercel, Netlify and Docker for more information.

Credits

  • shadcn/ui - For the initial implementation of the data table.