Design with AI
Design with AI

Data table with sorting, filtering, and search

Building a data table with sorting, filtering, and search functionality using AI.

LLM Written
Human Reviewed Partially

Info

The code/screen is incomplete, this is intended to teach how to steer AI to the complete screen in our free classes. As of writing this page, the first class has not happened. We will publish the completed screen soon.

Repo to run this youself

https://github.com/amarneethi/aidesignsetupdesignsystemprojects.git

Claude Projects

Output

Output

Contents of the project setup in Claude chat

DESIGN_SYSTEM.md

package.json

Claude projects files setup screenshot

Prompt history

_Chat History — Interview Tracker Component


_Turn 1

_User

An interview tracker data table with sorting, filtering, and inline editing for a tech company. Use the design system.

_System Context

The project includes two files:

  • DESIGN_SYSTEM.MD — A comprehensive design system reference (Next.js 16 + React 19 + Tailwind CSS 4) with components like Button, TextInput, Select, Modal, DataTable, Tag, Tabs, Search, Header, SideNav, Breadcrumb, Form, and more. Includes design tokens, theming, and a style guide.
  • package.json — Dependencies: next 16.1.6, react 19.2.3, lucide-react, tailwindcss 4.

_Claude

Read the frontend design skill file and checked the project structure, then generated InterviewTracker.jsx — a full-page interview pipeline tracker built with the design system.

Summary of what was built:

Data Table Features

  • Sorting on all columns (default: newest applied first)
  • Row selection with batch actions (Move Stage, Reject)
  • Inline editing on Role and Interviewer columns (double-click to edit)
  • Pagination with configurable page sizes (5/10/25)
  • Sticky header and striped rows

Filtering

  • Full-text search across name, role, email, and interviewer
  • Dropdown filters for Stage, Team, and Status
  • Tab-based views: All, Active, Offers & Hired, Closed
  • Clear filters button when any filter is active

Layout

  • Full app shell with Header, SideNav, and Breadcrumb
  • Summary stat cards (Total, Active Pipeline, Offers Out, Hired)
  • Add Candidate modal with a structured form using FormGroup/FormRow

Data Details

  • 12 seed candidates across roles like Frontend, Backend, ML, DevOps, Design, and more
  • Color-coded stage tags and status icons
  • Star ratings, source tracking, and next interview dates with "Today"/"Tomorrow" highlighting

_Turn 2

_User

Remove the leftnav and topnav. Make the rest responsive and mobile first.

_Claude

Reviewed the existing file, then rewrote InterviewTracker.jsx with Header and SideNav removed and fully responsive, mobile-first layout applied.

What changed:

Removed: Header and SideNav components (and all related imports/state). The page is now a standalone content view.

Mobile-first responsive updates:

  • Page padding scales up: px-4sm:px-6md:px-8lg:px-10, with a max-w-[1600px] centered container
  • Title row stacks vertically on mobile, goes side-by-side on sm:. Button labels collapse — "New Candidate" becomes "Add", Export hides its label and goes icon-only
  • Stat cards use a 2-column grid on mobile, expanding to 4-column on md:. Padding and icon sizes shrink on small screens
  • Tabs sit inside a horizontally scrollable wrapper with negative margin bleed for narrow screens
  • Filters are now behind a toggle button (with a badge count). The panel stacks single-column on mobile, 3-column side by side on wider screens
  • DataTable wraps in a horizontally scrollable container with a min-w-[960px] inner width and negative margin bleed, scrolling naturally on mobile while remaining full-width on desktop

_Turn 3

_User

Create a markdown version of this chat history without the code generated. Clearly mark user/system input and output

Claude Code

Output

Output

Prompt history

_Interview Tracker Data Table — Chat History


_User

An interview tracker data table with sorting, filtering, and inline editing for a tech company. Use the design system.


_Assistant

Explored the codebase to understand the project structure and design system:

  • Framework: Next.js 16.1.6 with React 19, Tailwind CSS 4, lucide-react icons
  • Design System: 22 custom-built components (no external UI library), 3 themes (light/dark/high-contrast), comprehensive design tokens for colors, spacing, typography, shadows, motion
  • Existing DataTable component with sorting, row selection, pagination, inline editing, batch actions, custom cell rendering
  • Component styling pattern: 'use client' components using forwardRef, semantic design tokens via CSS custom properties, Tailwind arbitrary values
  • Page pattern reference: Multi-step onboarding form at src/app/multistepform/claudecode/page.js

Read the existing DataTable component, the target page file (empty), and the component barrel exports to understand available building blocks.

Built the interview tracker page at src/app/datatableinterviewtracker/claudecode/page.js with:

  • Stats dashboard — 5 cards showing total candidates, scheduled, in progress, completed, and starred counts
  • Search — filter by candidate name, email, role, or interviewer
  • Filter bar — dropdowns for Stage, Status, and Department with active filter count badge and clear button
  • Sortable columns — click headers to sort by name, role, stage, status, rating, interviewer, or date
  • Inline editing — double-click the interviewer or notes columns to edit in place
  • Row selection & batch actions — select rows to delete or export candidates
  • Star/unstar candidates — toggle star icon per row
  • Candidate detail modal — click a candidate name to view full details with rating, notes, and all metadata
  • Add candidate modal — form with name, email, role, department, stage, interviewer, date, status, and notes
  • Pagination — 5/10/25 per page with sticky headers and striped rows
  • 15 sample candidates across Engineering, Design, Product, and Marketing departments
  • Color-coded tags — stages (gray/purple/teal/blue/green) and statuses (blue/teal/green/red)
  • Toast notifications — success messages for edits, deletes, and additions
  • Fully themed — uses the design system tokens, works with light/dark/high-contrast themes

Fixed an unused Search import from lucide-react flagged by the IDE diagnostics.

Verified the build — the only error was a pre-existing empty placeholder at claudeprojects/page.js, not from the new page.


_User

Create a markdown version of this chat history without the code generated. Clearly mark user/system input and output.

On this page