> 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-sync/docs/table.md).

# Table

The KlassApp ledger table. Blade equivalent: `<x-table>` in `resources/views/components/table.blade.php`.

Wraps a `<table>` in `.ds-table-wrap` and renders your `<tr>` children into `<tbody>`.

```jsx
<Table headers={['#', 'Student', 'Amount', 'Method', 'Paid On']}>
  <tr><td>1</td><td>Nakato Sarah</td><td>UGX 450,000</td><td>SchoolPay</td><td>12 Sep 2026</td></tr>
</Table>
```

## Props

* `headers`: `string[]` — omit or pass `[]` for no `<thead>`
* `density`: `comfortable` (default) · `compact`
* `selectable`: prepends a checkbox header cell
* `sortable`: appends a sort arrow to every header cell
* `cardMobile`: default `true` — stacked-card layout at ≤767px

## Two things to know

**It emits `.ds-table-ledger`, not `.ds-table`.** `DESIGN_SYSTEM.md` documents the latter; the component has moved on. If you are writing raw markup to match, use `.ds-table-ledger` + `.dt-comfortable` / `.dt-compact`.

**`striped` and `hover` do nothing.** Both are declared in the Blade `@props` but never referenced in the template, so they emit no class. They are accepted for API parity only. Several production views pass them expecting an effect — do not copy that. Row hover comes from `.ds-table-ledger` itself.

## Complex tables

For a view that needs split content (active + archived in one screen), skip the component and use the raw `.ds-table-wrap` / `.ds-table-ledger` classes.


---

# 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-sync/docs/table.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.
