Skip to main content

Primitive contract

TableShell

Styles native table content, density, numeric alignment, optional sticky header, and honest overflow affordance without providing data-grid behavior.

Semantic responsive table wrapper · @sanchika/primitives

Purpose and semantics

Styles native table content, density, numeric alignment, optional sticky header, and honest overflow affordance without providing data-grid behavior.

Recommended semantic: Use a native table with caption, column headers, and row headers where appropriate inside a labelled scroll region only when overflow is genuinely necessary.

Anatomy

shell

Boundary and density owner.

overflow affordance

Visible wide-data guidance.

viewport

Focusable scroll region only when needed.

table

Native table semantics.

caption

Visible data-set name.

headers

Column and optional row relationships.

Finite variants and important states

Variant · density
compact, comfortable
Variant · header
static, sticky
Required states
comfortable, compact, sticky-header, overflow, zoom-200, zoom-400
Class hooks
.sk-table-shell · .sk-table-shell__viewport · .sk-table-shell__affordance · .sk-table-shell__numeric

Composed synthetic exemplar

Rendered state matrix

TableShell: 6 required states

Each specimen starts from the package-owned example and contract state inventory. Simulated pointer and focus frames are labelled; consumers still verify real interaction in context.

comfortableThe comfortable contract remains visible and inspectable.

Scroll horizontally for source detail.

Synthetic filing amounts
PeriodAmount
April 2026₹12,34,567.00
compactThe compact contract remains visible and inspectable.

Scroll horizontally for source detail.

Synthetic filing amounts
PeriodAmount
April 2026₹12,34,567.00
sticky headerThe sticky header contract remains visible and inspectable.

Scroll horizontally for source detail.

Synthetic filing amounts
PeriodAmount
April 2026₹12,34,567.00
overflowThe overflow contract remains visible and inspectable.

Scroll horizontally for source detail.

Synthetic filing amounts
PeriodAmount
April 2026₹12,34,567.00
zoom 200The zoom 200 contract remains visible and inspectable.

Scroll horizontally for source detail.

Synthetic filing amounts
PeriodAmount
April 2026₹12,34,567.00
zoom 400The zoom 400 contract remains visible and inspectable.

Scroll horizontally for source detail.

Synthetic filing amounts
PeriodAmount
April 2026₹12,34,567.00

Accessibility and consumer responsibility

Keyboard and screen reader
  • Focusable scroll region only when overflow exists
  • Focus remains visible inside viewport
  • No grid keyboard model
  • Caption and headers required
  • Use row headers where appropriate
  • Name scroll region
Consumer owns
  • Provide semantic table markup
  • Detect genuine overflow
  • Own interactive behavior
  • Choose priority data
  • Test zoom
Mobile
  • Allow genuine horizontal overflow with visible affordance
  • Do not universally transform rows into cards
  • Keep priority data reachable
Reduced motion and forced colors

No override is required.

  • Table borders, header boundaries, and viewport focus remain visible

Compact API reference

Package
@sanchika/primitives
CSS
@sanchika/primitives/styles.css
Contract
primitiveSpecs.find((contract) => contract.name === "TableShell")
Primary class
.sk-table-shell