Skip to content

Styling ​

The component ships unstyled by default — semantic <table>/<article> markup with BEM-ish class names, no visual opinion. The look is entirely up to the consumer: wire the cell-/card-/actions slots to your own component library instead of plain HTML, as shown in Extension points.

The bundled stylesheet ​

A ready-to-use Material-ish stylesheet is available as an opt-in import, for consumers who don't already have their own design system — this whole documentation site uses it:

ts
import 'v0-adaptive-table/style.css'

It exposes a handful of CSS variables for quick theming:

VariablePurpose
--v0-at-surfaceTable/card/list background
--v0-at-textBase text color
--v0-at-borderBorder color
--v0-at-mutedSecondary text (subtitle, labels)
--v0-at-hoverRow/header hover background
--v0-at-radiusBorder radius
--v0-at-accentActive sort indicator
--v0-at-shadowCard/list drop shadow

Set them on .v0-adaptive-table or an ancestor to override:

css
.v0-adaptive-table {
  --v0-at-accent: #7c3aed;
  --v0-at-radius: 4px;
}

The stylesheet pins color-scheme: light on the root so its own light-mode colors aren't overridden by a dark browser or OS preference — there's no dark variant yet.

Class names ​

ClassWhere
.v0-adaptive-table__gridDesktop <table>
.v0-adaptive-table__cards, .v0-adaptive-table__cardcard mobile mode
.v0-adaptive-table__card-title, -subtitle, -bodyCard sections
.v0-adaptive-table__card-field--blockA field given its own line via mobile.block
.v0-adaptive-table__list, .v0-adaptive-table__list-itemlist mobile mode
.v0-adaptive-table__list-summaryThe clickable, always-visible row summary
.v0-adaptive-table__list-detailThe body fields, only present once a row is expanded

None of these are part of the component's public API in the semver sense — they're a styling hook, not a contract. If you need something more structural than a CSS override, reach for a slot instead.