Usage
The Table component provides a full-featured data table implementation using @tanstack/vue-table. It supports sorting, filtering, pagination, row selection, column pinning, virtualization, and more.Props
The data array to display in the table.
Array of column definitions. Each column can have
accessorKey, header, cell, footer, and more TanStack Table column options.The element or component this component should render as.
Optional caption text for the table.
Table metadata including custom class and style functions for rows.
Enable virtualization for large datasets. When enabled, only visible rows are rendered. Note: divider and sticky properties are not supported with virtualization.You can pass
true for default settings or an object with:overscan(number): Number of items rendered outside the visible area. Default:12estimateSize(number | function): Estimated size in px of each item. Default:65
The text to display when the table is empty.
Whether the table should have a sticky header or footer. Use
true for both, 'header' for header only, or 'footer' for footer only. Not supported when virtualize is true.Whether the table should be in loading state.
Color of the loading indicator.
Animation style for the loading indicator.
Customize reactivity for data changes. Disable deep watching or limit traversal depth to improve performance.
TanStack Table Feature Props
The Table component supports all TanStack Table features through dedicated props:Options for global filtering. See TanStack Table Global Filtering Guide.
Options for column filtering. See TanStack Table Column Filtering Guide.
Options for column pinning. See TanStack Table Column Pinning Guide.
Options for column sizing. See TanStack Table Column Sizing Guide.
Options for column visibility. See TanStack Table Column Visibility Guide.
Options for sorting. See TanStack Table Sorting Guide.
Options for grouping. See TanStack Table Grouping Guide.
Options for row expanding. See TanStack Table Expanding Guide.
Options for row selection. See TanStack Table Row Selection Guide.
Options for row pinning. See TanStack Table Row Pinning Guide.
Options for pagination. See TanStack Table Pagination Guide.
Options for column faceting. See TanStack Table Column Faceting Guide.
Event Handlers
Callback fired when a row is selected/clicked.
Callback fired when a row is hovered.
Callback(s) fired when a row is right-clicked.
Additional CSS classes to apply.
UI customization object for styling table slots.
Models (v-model)
The Table component provides v-model bindings for all TanStack Table state:Global filter value.
Column filter state.
Column order state.
Column visibility state.
Column pinning state.
Column sizing state.
Column sizing info state.
Row selection state.
Row pinning state.
Sorting state.
Grouping state.
Expanded rows state.
Pagination state.
Slots
Content to display when a row is expanded.
Custom content to display when the table is empty.
Custom content to display when the table is loading.
Custom table caption content.
Content to insert at the top of the table body.
Content to insert at the bottom of the table body.
Custom header content for a specific column. Replace
{columnId} with the column’s ID.Custom footer content for a specific column. Replace
{columnId} with the column’s ID.Custom cell content for a specific column. Replace
{columnId} with the column’s ID.