Skip to content

Tabular

@sectile/tabular is renderer-neutral core for query, selection, cursor, editing, and hierarchy state. Choose DataTable, DataGrid, or DataTreeGrid according to the interaction density of the surface.

sh
pnpm add @sectile/tabular

Choose a profile first

QuestionChoose
Do users read, compare, sort, filter, and select rows?DataTable
Must every cell support arrow navigation and editing?DataGrid
Does the grid also need parent and child branches?DataTreeGrid

Start from one data contract

Keep shared capabilities intact, then choose the interaction profile that matches how the surface is navigated.

Identity
row · column · cell · group ID
Schema
columns · nested headers · capabilities
Query
sort · filter · group · aggregate · pivot
Source
request · source · view revision
Access
page · window · visible counts
Selection
explicit row · all-matching
Columns
order · hidden · pinned start/end
Ownership and safety
controlled slices · limits · atomic errors
Choose a navigation unit
Selected profile

DataTable

Read and compare rows

Owned by this profile
  • Native table and form semantics
  • Sort, filter, and row selection
  • Group-row disclosure
  • Edit commit intent
Compose outside when neededLoading · empty · error · retryVirtualization · measurement · scroll

DataTable

Native table semantics, query controls, checkbox selection, and form integration.

A table for reading and comparisonUse search, sorting, and selection, then inspect the same UI by host.
UsersCompare teams, roles, and account status · 8 shown
OverviewSearch, sorting, and selection share one projection.
User informationAccount activity
No matching users
Select a column heading to sort · Shift-select a row range · Select all matching 0 shown · 0 selected

Explore every DataTable feature →

DataGrid

Two-dimensional cursor, roving focus, edit/commit/cancel, and cursor recovery.

A cell-oriented workspaceUse a two-dimensional cursor and editable cells in a real grid.
Release readinessMove through cells and edit release work in place · 8 items
Overview{"cursor":null,"selected":{"kind":"explicit-rows","rowIDs":[]}}
Shift-select a row range · Arrow keys move · Enter edits · Escape cancels 0 rows selected

Explore every DataGrid feature →

DataTreeGrid

DataGrid plus expansion, hierarchy metadata, and retained parent context.

A hierarchical workspaceNavigate parent context and leaf cells in one treegrid.
Service ownershipManage domains and services in one hierarchy · 9 services
Overview{"cursor":null,"edit":"navigation","visibleRows":0}
Service
Owner
Tier
Region
Status
Expand groups · Shift-select visible leaves · move between cells · edit leaves 0 visible rows

Explore every DataTreeGrid feature →

Choose a layer

Needed scopeInstallImport
State, query, and projection@sectile/tabular@sectile/tabular/data-*
Existing HTML elements@sectile/dom @sectile/tabular@sectile/dom/tabular
Vue compound components@sectile/vue @sectile/tabular vue@sectile/vue/data-table, @sectile/vue/data-grid, @sectile/vue/data-tree-grid

@sectile/tabular knows nothing about DOM, Vue, or terminals. It is an optional peer of @sectile/dom and @sectile/vue, so install it only when using their Tabular subpaths. Tabular has no terminal host.

Every example's Code tab presents the same feature in Vue, DOM, and Core. Verify the interaction first, then choose the implementation for your environment.

Continue by task

TaskGuide
Understand IDs, query, selection, and revisionsShared contracts
Server sorting, filtering, paging, loading, and retryAsync sources
Connect existing elements and eventsDOM composition
Typed components, Provider, slots, and SSRVue composition
Window only genuinely large viewsVirtualization

Responsibility boundary

Tabular produces deterministic next state, projections, and commands from events. The application owns network, cache, persistence, and loading/empty/error presentation. DOM or Vue hosts own elements, focus, forms, measurement, and scroll. Shared contracts and async sources demonstrate these boundaries.

Public subpaths

PathResponsibility
/modelIDs, immutable model, controlled ownership, limits
/queryFilter, sort, group, aggregate, and pivot descriptors
/sourceRequest/response, page/window, client source
/data-tableRead-oriented table controller
/data-gridCell-oriented grid controller
/data-tree-gridHierarchical grid controller
/virtualOptional adapter for consumer-installed @sectile/virtual

Released under the MIT License.