Skip to content
Storybook

Table

Data table with sortable columns, row selection, status badges, end-aligned numbers and row actions.

Preview

React · live from the Storybook

HTML and CSS

The same component as plain HTML with pixels-ui.css, no framework needed.

StatusRoleActions
OROlivia Rhye
ActiveProduct designer$4,200
PBPhoenix Baker
OfflineEngineer$12,980
LSLana Steiner
InvitedResearcher$860

Usage

  • Numbers align to the end with tabular figures.
  • Actions are icon buttons with aria-labels.

Installation

Included in the core files. No extra install.

HTML
<link rel="stylesheet" href="/css/pixels-tokens.css">
<link rel="stylesheet" href="/css/pixels-ui.css">
<script src="/js/pixels-ui.js" defer></script>

API reference

Class / attributeTypeDescription
px-table-wrap · px-tableclassScroll container and table.
data-px-tableattributeSelect-all + sort behaviour.
px-num · px-table__lead · __strong · __actionsclassCell types (Figma Cell Type).
px-table__sortclassSortable header button; th gets aria-sort.

Figma properties

Table2 variants · page “Table”Open

Example data table assembled from Header cell and Cell instances: sortable Name column, row selection, status badges, end-aligned amounts and row actions. RTL reverses column order. Use semantic <t…

PropertyTypeValues
DirectionVariantLTR RTL
Table / Header cell6 variants · page “Table”Open

Column header. Sortable headers are buttons with aria-sort. Resize the cell width to the column width.

PropertyTypeValues
LabelText“Column”
CheckboxBoolean—
SortVariantNone Ascending Descending
DirectionVariantLTR RTL
Table / Cell30 variants · page “Table”Open

Body cell types. Lead holds the row checkbox and primary identifier; Number aligns to the inline end with tabular figures; Actions holds icon buttons with aria-labels. Hover/Selected apply to the whol…

PropertyTypeValues
TextText“Product designer”
TypeVariantLead Text Badge Number Actions
StateVariantDefault Hover Selected
DirectionVariantLTR RTL

Design tokens

Component tokens from the Figma Component collection. Override them to restyle just this component.

TokenAliasLight value
--px-table-header-backgroundcolor-surface-sunken#f9fafb
--px-table-header-contentcolor-content-neutral-secondary#475467
--px-table-bordercolor-border-neutral-subtle#f2f4f7
--px-table-contentcolor-content-neutral-secondary#475467
--px-table-radiusradius-1616px
--px-table-header-heightspacing-4040px
--px-table-row-heightspacing-5656px
--px-table-cell-padding-xspacing-2xl24px

Accessibility

  • Use semantic <table>; sortable headers set aria-sort.
  • Row checkboxes need labels.