A dependency-free Custom Element that enhances a normal HTML table with three-state sorting, fuzzy filtering, sums, pagination, row/column hover and copy as CSV or Markdown.

Name City Age Amount
StenViborg6112450.50
AnitaBarcelona218200
LarsAarhus5915100
MaríaMadrid349750.25
WeiShanghai4218300
LucíaValencia2811120
OliverLondon4616750
SofiaSevilla3110300
NoahOslo3814250
EmmaCopenhagen2713300
MateoMálaga5320150
FrejaOdense4417680
LucasLisbon3611990
ClaraBerlin4915840
JonasAalborg339050

Configuration playground

Change the options and see the table update immediately.

Live preview

Name City Age Amount
StenViborg6112450.50
AnitaBarcelona218200
LarsAarhus5915100
MaríaMadrid349750.25
WeiShanghai4218300
LucíaValencia2811120
OliverLondon4616750
SofiaSevilla3110300
NoahOslo3814250
EmmaCopenhagen2713300
MateoMálaga5320150
FrejaOdense4417680
LucasLisbon3611990
ClaraBerlin4915840
JonasAalborg339050

Attribute reference

Option Effect
sortableASC → DESC → NONE with a live ↕ / ↑ / ↓ indicator.
filterInstant fuzzy filtering.
sum="none|auto|all"Controls generated numeric sums.
sum-scope="page|filtered"Sum the visible page or all rows matching the filter.
paginationEnables pagination.
page-size="10"Rows per page.
page-size-options="5,10,25"Values offered by the page-size selector.
pagination-position="top|bottom|both"Where pagination controls are rendered.
pagination-window="5"Maximum number of numbered page buttons.
pagination-info="true|false"Shows or hides the row range.
pagination-first-last="true|false"Shows or hides first/last controls.
pagination-page-size-select="true|false"Shows or hides the page-size selector.
copy-csv / copy-mdCopies only the rows actually visible on the current page.
lang="en|da|es|ch"Component UI language. English is default.
<netsi-table
  sortable
  filter
  sticky-header
  sticky-footer
  sum="auto"
  sum-scope="page"
  hover-row
  hover-col
  copy-csv
  copy-md
  pagination
  page-size="10"
  page-size-options="5,10,25,50"
  pagination-position="bottom"
  pagination-info="true"
  pagination-first-last="true"
  pagination-page-size-select="true"
  pagination-window="5"
>
  <table>...</table>
</netsi-table>

About

netsi-table keeps the original table as semantic HTML and progressively enhances it without dependencies.

Copy CSV and Copy MD always use exactly the rows currently displayed. With pagination enabled that means the current page only. Filtering and pagination therefore both affect copied output.