> For the complete documentation index, see [llms.txt](https://klassdocs.gitbook.io/klassapp-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://klassdocs.gitbook.io/klassapp-documentation/design/system/components/data-display/table.prompt.md).

# Table.prompt

The KlassApp ledger table — every roster, fee list and attendance register is one of these.

```jsx
<Table headers={['#', 'Student', 'Amount', 'Method', 'Status']} sortable>
  <tr>
    <td data-label="#">1</td>
    <td data-label="Student">Nakato Sarah</td>
    <td className="dt-cell-num" data-label="Amount">UGX 450,000</td>
    <td data-label="Method">SchoolPay</td>
    <td className="dt-cell-badge" data-label="Status"><Badge variant="paid">Paid</Badge></td>
  </tr>
</Table>
```

### Props

`headers` · `density` (`comfortable` default / `compact`) · `selectable` · `sortable` · `cardMobile` (default true).

### Things to know

* It emits `.ds-table-ledger`, not `.ds-table`. Header rule is a 2px `--d-blue` underline; row hover is a 4% green wash with an inset 3px green rail.
* **`striped` and `hover` do nothing** — declared upstream, never referenced. Don't pass them expecting an effect.
* Put `data-label="Column"` on every `<td>`: at ≤767px rows restack as cards and the label becomes the row's field name.
* Right-align numbers with `.dt-cell-num` (tabular figures); wrap status pills in `.dt-cell-badge`.
* For a screen that needs two tables in one shell (active + archived), skip the component and use raw `.ds-table-wrap` / `.ds-table-ledger`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://klassdocs.gitbook.io/klassapp-documentation/design/system/components/data-display/table.prompt.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
