search ESC

Tables

Static HTML tables with sizing, header, contextual, sortable, selectable, sticky-header, toolbar/footer, responsive, and empty/loading variants.

1. Basic table
#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
2. Striped & hover
#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
3. Bordered & borderless

Bordered

#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin

Borderless

#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
4. Size variants

Small (lp-table--sm)

#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin

Default

#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin

Large (lp-table--lg)

#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
5. Header variants

Light header (lp-thead--light)

#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin

Dark header (lp-thead--dark)

#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
6. Contextual row colors
#NameEmailRole
1Primaryprimary@example.comAdmin
2Secondarysecondary@example.comEditor
3Successsuccess@example.comViewer
4Dangerdanger@example.comEditor
5Warningwarning@example.comAdmin
6Infoinfo@example.comViewer
7Activeactive@example.comAdmin
7. Responsive wrapper

A table with many columns overflows its container gracefully. Resize the window.

#NameEmailPhoneDepartmentRoleLocationStart DateManagerStatus
1Alice Johnsonalice@example.com+1 555 0100EngineeringAdminNew York2022-03-14Jane DoeActive
2Bob Smithbob@example.com+1 555 0101ProductEditorSan Francisco2021-08-02John LeeActive
3Carol Whitecarol@example.com+1 555 0102DesignViewerLondon2023-01-19Jane DoePending
4David Browndavid@example.com+1 555 0103EngineeringEditorBerlin2020-11-05John LeeInactive
8. Sortable columns

Click any header to sort. Click again to reverse direction.

# Name Email Role
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
9. Selectable rows (checkboxes)

Header checkbox toggles all rows. Per-row checkboxes toggle single selections. Listen for the selection-change event.

0 rows selected

Name Email Role
Alice Johnsonalice@example.comAdmin
Bob Smithbob@example.comEditor
Carol Whitecarol@example.comViewer
David Browndavid@example.comEditor
10. Toolbar & footer
Team Members
#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
11. Sticky header

Scroll inside the box — the header row stays pinned.

#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
12. Empty & loading states

Empty state

#NameEmailRole
No records found. Try adjusting your filters.

Loading state (lp-table--loading)

#NameEmailRole
1Alice Johnsonalice@example.comAdmin
2Bob Smithbob@example.comEditor
3Carol Whitecarol@example.comViewer
4David Browndavid@example.comEditor
5Eve Daviseve@example.comAdmin
CSS class reference
ClassPurpose
.lp-tableBase table
.lp-table--hoverHighlight rows on hover
.lp-table--stripedZebra-stripe rows
.lp-table--striped-columnsStripe columns instead of rows
.lp-table--borderedFull border grid
.lp-table--borderlessRemove all borders
.lp-table--sm / --compactReduced padding
.lp-table--lgIncreased padding
.lp-table--align-{top|middle|bottom}Cell vertical alignment
.lp-table--nowrapPrevent cell content wrapping
.lp-table--caption-topMove caption to the top
.lp-table--stickyPin header row (inside scroll container)
.lp-table--loadingDim + stripe overlay
.lp-thead--light / --darkHeader background variants
.lp-table-sortableSortable column header (toggles --asc/--desc)
.lp-table-checkNarrow first column for checkboxes
.lp-table-row--{primary|secondary|success|danger|warning|info}Contextual row background
.lp-table-row--selected / --activeRow states
.lp-table-cell--{success|danger|warning|info}Contextual cell text color
.lp-table-responsiveHorizontal scroll wrapper
.lp-table-toolbar / -title / -actions / -selection-infoToolbar chrome above the table
.lp-table-footerFooter chrome below the table
.lp-table-emptyEmpty-state row cell
Events

All events are CustomEvents dispatched on the <table> element. They bubble.

EventFires whenevent.detail
lp:table:sort A sortable header was clicked and rows reordered { column, direction }
lp:table:selection-change Row selection changed (via checkbox or API) { selected, all }

Programmatic API (selectable tables): instance.getSelection(), selectAll(), clearSelection().