U.S. flagA digital services project by Flexion

Table

layoutUSWDS-derived

A styled data table with support for bordered, borderless, striped, compact, scrollable, and stacked variants.

Reference: USWDS documentation ↗

Variants

Borderless

NameValue
Alpha1
Beta2

Compact

NameValue
Alpha1
Beta2

Default

Document titleDescriptionYear
Declaration of IndependenceStatement of US independence from Britain1776
Bill of RightsFirst 10 amendments to the Constitution1791
Emancipation ProclamationFreed enslaved people in Confederate states1863

Scrollable

NameDescriptionYearCategoryStatusNotes
Declaration of IndependenceStatement of US independence from Britain1776FoundingActiveWidely celebrated
Bill of RightsFirst 10 amendments to the Constitution1791AmendmentActiveRatified by states

Striped

NameValueStatus
Alpha1Active
Beta2Inactive
Gamma3Active
Delta4Inactive

Contract

Class mapping

USWDSFlexNotes
usa-table.flex-tableBase table class
usa-table--borderlessdata-variant="borderless"Borderless variant
usa-table--stripeddata-stripedAlternating row backgrounds
usa-table--compactdata-compactReduced cell padding
usa-table-container--scrollable.flex-table__container[data-scrollable]Scrollable table wrapper
usa-table--stackeddata-stackedResponsive stacking on mobile
usa-table--stacked-headerdata-stacked-headerStacked with header column visible

Verified properties

font-familyfont-sizeline-heightborder-collapsecolortext-alignpadding-toppadding-rightpadding-bottompadding-leftborder-top-widthborder-right-widthborder-bottom-widthborder-left-widthbackground-color

Intentional differences

border-color: ours = var(--flex-color-text), USWDS = #1b1b1b

We use semantic token that resolves to same value in light mode

Source CSS