Complete reference for every prop on the copied <BetterTable /> component.
<BetterTable /> is copied into your app by better-tables init (see UI & CLI) — import it from your local path:
import { BetterTable } from '@/components/better-tables-ui/table/table';
Pass data plus either a table definition (supplies identity and columns) or both id and columns. id alone is not enough — the component throws without columns.
Unique table instance id (keys the state store and URL params). Defaults to table.tableName when table is given
name
string
Human-readable display name. Defaults to table.tableName
columns
ColumnDefinition[]
Column definitions. Defaults to table.columns. Server aggregates: t.count / t.aggregate
table
TableDefinition
A defineTable() / tables.define() definition — sugar for columns/id/name (explicit props still win). Enables auto columns resolution when paired with adapter
FilterState[] | FilterGroupNode — a FilterGroupNode tree seeds the initial query, but the filter bar edits flat: the first user edit replaces the tree with a flat implicit-AND array (tree editing is not shipped)
initialSorting
SortingState
initialPagination
PaginationState
initialSelectedRows
Set<string>
initialColumnVisibility
ColumnVisibility
defaultVisibleColumns
string[] — ids visible by default; others start hidden
Auto-reveal a column while it has an active filter (default true). Removing the filter re-hides the column only when defaultVisibleColumns is provided (and the column isn't in it); without that prop, revealed columns stay visible
isFilterProtected(filter)
Return true to lock a filter — shown with a lock icon, not removable
true or { height?, rowHeight?, overscan? } — see Large datasets
className
Root class name
rowConfig
getId(row) (row identity — required for selection/editing when rows have no id field) and onClick(row) are wired; the remaining RowConfig fields (isSelectable, isExpandable, expandedContent, className, style) are contract-only today — the copied table.tsx doesn't read them yet
emptyState
{ description?, icon? } empty-state config (emptyMessage wins for text)
Turning pagination off renders every row — pair with virtualized for big datasets.
Those are the only feature flags. Bulk-action controls appear for selected rows when actions is non-empty and at least one action is visible (isVisible can hide them) — there's no bulkActions flag — and virtualization is the virtualized prop, not a feature flag. Initial filters use the initialFilters prop and the loading state (skeleton rows) uses the loading boolean prop.