OpenParable
Skip to content
← Back to skills

Rezi Data Table

Development
rezi-data-table

Rezi Data Table is an Agent Skill for development published in the RtlZeroMemory/Rezi repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Add a data table with sorting, selection, and keyboard navigation. Use when displaying tabular data.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/RtlZeroMemory/Rezi/blob/HEAD/.claude/skills/rezi-data-table/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/rezi-data-table, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

When to use

Use this skill when:

  • Displaying tabular data with rows and columns
  • Need sorting, selection, or keyboard navigation on data
  • Building dashboards or data-heavy screens

Source of truth

  • packages/core/src/widgets/useTable.ts — useTable() hook
  • packages/core/src/widgets/types.ts — TableProps
  • packages/core/src/widgets/ui.ts — ui.table()
  • packages/core/src/ui/recipes.ts — recipe.table() for design-system-consistent table styling

Steps

  1. Use the useTable() hook inside a defineWidget:

    import { defineWidget, ui, useTable } from "@rezi-ui/core";
    
    const DataTable = defineWidget<{ items: Item[] }>((props, ctx) => {
      const table = useTable(ctx, {
        rows: props.items,
        columns: [
          { key: "name", header: "Name", flex: 1 },
          { key: "size", header: "Size", width: 10, align: "right" },
        ],
        getRowKey: (row) => row.id,
        selectable: "multi",
       });
      return ui.table({
        ...table.props,
        dsSize: "md",
        dsTone: "default",
      });
    }, { name: "DataTable" });
    
  2. Handle selection via table.selection (array of selected row keys)

  3. Handle sorting via table.sortColumn and table.sortDirection

  4. For large datasets, consider ui.virtualList() instead

Design system note

Tables are recipe-styled by default when a ThemeDefinition preset is active. Use dsSize / dsTone for explicit DS tuning when needed.

Verification

  • Correct columns render with headers
  • Selection updates on keyboard/mouse interaction
  • Sorting works in both directions