<!-- Auto-generated by `velinstyle docs generate`. Do not edit. Source: components/velin-data-table.js -->

# <velin-data-table>

Source: `components/velin-data-table.js`

## Minimal working example
Copy-paste starter (load CSS + `velinstyle-components` / `bootFromDOM` as needed):

```html
<velin-data-table filter-input="#filter" page-size="5" label="Team">
  <label class="velin-label" for="filter">Filter</label>
  <input id="filter" class="velin-input" type="search">
  <table>
    <caption>Team</caption>
    <thead><tr><th data-sort="text">Name</th><th data-sort="number">Score</th></tr></thead>
    <tbody>
      <tr><td>Ada</td><td data-sort-value="98">98</td></tr>
      <tr><td>Grace</td><td data-sort-value="95">95</td></tr>
    </tbody>
  </table>
</velin-data-table>
```

## Accessibility
WCAG contract status: **pass** (framework target: AAA).

- **Roles:** `button`
- **Keyboard:** Sort buttons; editable cells: Enter/F2 edit, Escape cancel; pagination
- **Live region:** `polite`
- **Reduced motion:** honored
- **Notes:** Enhances a light-DOM table. Optional editable attribute or data-editable cells for inline edit (velin-data-table-edit). No virtualization in v1.

## Attributes
| Attribute | Notes |
| --- | --- |
| `page-size` | Observed — triggers `attributeChangedCallback` when changed |
| `filter-input` | Observed — triggers `attributeChangedCallback` when changed |
| `empty-text` | Observed — triggers `attributeChangedCallback` when changed |
| `label` | Observed — triggers `attributeChangedCallback` when changed |
| `editable` | Observed — triggers `attributeChangedCallback` when changed |
## Events
- `velin-data-table-edit` (bubbles)
- `velin-data-table-filter` (bubbles)
- `velin-data-table-page` (bubbles)
- `velin-data-table-sort` (bubbles)
## CSS parts
_None._
## Slots
_None._
## Public API
| Kind | Name |
| --- | --- |
| Method | `filter()` |
| Method | `goToPage()` |
| Method | `sort()` |
| Property | `matchingRows` |
| Property | `page` |
| Property | `pageCount` |
| Property | `pageSize` |
| Property | `rows` |
| Property | `visibleRows` |
