Table

Represents tabular data presented in a two-dimensional format comprised of rows and columns of cells. Table should not be confused with a DataGrid, which has more advanced functionality.


Utilizes the Lit Adaptor provided by TanStack Table to build and render the table.
import '@ods/components/web.table';

Note: You only need to import a web component once in your code, as it registers itself globally when defined, allowing you to use it anywhere within your application without needing to re-import it each time you want to use the component.

Properties

Please note, both DOM properties and HTML attributes are shown in the table below. Unless otherwise specified, the property and attribute names are identical.

Property/AttributeReflectsTypeDefault
columns
ColumnDef<unknown, any>[][]
data
RowData[][]

Parts

NameDescription
baseThe table component's base wrapper.
headerThe table component's header wrapper.
header-rowThe table component's header row wrapper.
bodyThe table component's body wrapper.

Search