Data Tables
FreePresent repeated records as a real table on wide screens and a list on narrow ones, with sort and empty state.
Purpose
Replace div-grids that look like tables but are not navigable or responsive.
Procedure
--- name: data-tables description: Present repeated records as a real table on wide screens and a list on narrow ones, with sort and empty state. ---
Data Tables
Purpose
Replace div-grids that look like tables but are not navigable or responsive.
Procedure
If the region is a set of records with column headers, use a table element on wide viewports. Header cells name the column. Numeric columns are end-aligned and tabular.
Sorting is a button in the header, with aria-sort set. Do not sort by clicking the whole header if it also contains other controls.
Narrow viewports: do not force a 900px table to shrink until the text overlaps. Switch to a stacked list that shows the primary field and two secondary fields, or allow the table region itself to scroll horizontally with a caption that says so.
Empty: one sentence plus the action that creates the first row, if the user is allowed to create one. Do not render a single blank row of dashes.
Loading: reserve the header and show row skeletons that match the column count. Do not swap the entire page for a spinner.
Row actions live at the end. Destructive actions are not the first button. Do not paginate client-side if the source is already paginated; show the page controls the server gave you.
Example requests
1. Skill list
Request: Present these records with Data Tables. Sort by name and by updated date. Expected: A semantic table or a narrow list, a true empty state, and no fake row counts.
Dependencies
None. Work in the repository that is already open. Do not add packages unless the procedure names one.
Compatibility
This document follows the Agent Skills layout (a folder named data-tables containing SKILL.md). Claude Code, Cursor, Codex, and Gemini CLI can load that file from the paths in the Skilling installation guide. GitHub Copilot does not load SKILL.md. Use the Copilot instructions copy, and narrow applyTo before you commit it.
Example prompts
Skill list
Present these records with Data Tables. Sort by name and by updated date.
Expected: A semantic table or a narrow list, a true empty state, and no fake row counts.
Choose the agent
This skill is installed for one agent at a time. Pick the section you are using.
Related
- SaaS Dashboard
Structure an operational dashboard: status first, then the queue of work, then detail. No vanity metrics.
- Empty, Loading, Error
Specify the three non-happy states for any list or detail view so the UI never goes blank.
- Responsive Shell
Build an application shell that works at 390px and on a laptop: navigation, scroll, and safe targets.
Reviews
No reviews yet.
Sign in to review.
Report a problem
Inaccurate steps, an unsafe instruction, or a licensing concern.
Sign in to report.