Data display

Table

A native HTML table for tabular data.

Class nameTypeDescription
tableplf:tableComponentStyles a native table, its caption and cells
table-wrapperplf:table-wrapperPartScrolls a wide table
table-zebraplf:table-zebraModifierShades even body rows
table-borderedplf:table-borderedModifierBorders around every cell
table-pin-rowsplf:table-pin-rowsModifierKeeps the header and footer in view
table-pin-colsplf:table-pin-colsModifierKeeps each row's first header in view
Simple table without modifiers
Component Behavior
Badge Static label
Alert Static message
Table Native tabular content

Give every table a <caption>. Mark each column header with scope="col", and the first cell that names its row with scope="row": screen readers then read each cell with its headers, such as Static label with Behavior and Badge.

Recent publishing activity (example data)
Title Status Author Updated
Getting started with Pelatform UI Published Alex Morgan
A practical guide to accessible settings and meaningful feedback Needs review Sam Rivera
Independent roots and themes Draft Taylor Lee
Recent publishing activity (example data)
Title Status Author Updated
Getting started with Pelatform UI Published Alex Morgan
A practical guide to accessible settings and meaningful feedback Needs review Sam Rivera
Independent roots and themes Draft Taylor Lee

A wrapper that scrolls needs tabindex="0", role="region" and aria-labelledby pointing at the caption, so keyboard users can reach it. For sorting and filtering, use DataTable.

Pinned rows

Give the wrapper a height, such as max-h-60; the header stays in view as the rows scroll.

Components and their scripts
Component Category JavaScript
Accordion Data display No
Alert Feedback No
Badge Data display No
Button Actions No
Card Data display No
Checkbox Data input No
Modal Actions Yes
Pagination Navigation No
Combobox Data input Yes
Tabs Navigation Yes
Toast Feedback Yes
Tooltip Feedback Yes
Component bundles
Component CSS JavaScript ESM export
Tabs components/tabs.css components/tabs.js @pelatform/ui/components/tabs
Modal components/modal.css components/modal.js @pelatform/ui/components/modal
Tooltip components/tooltip.css components/tooltip.js @pelatform/ui/components/tooltip
Combobox components/combobox.css components/combobox.js @pelatform/ui/components/combobox
Toast components/toast.css components/toast.js @pelatform/ui/components/toast
Select components/select.css components/select.js @pelatform/ui/components/select

React

Table from @pelatform/react renders the table with its modifiers, and TableWrapper the wrapper that scrolls it; the caption, rows and cells stay native elements.

Prop Values Default
zebra true shades even body rows false
bordered true draws borders around every cell false
pinRows true keeps the header and footer in view false
pinCols true keeps each row’s first header in view false

TableWrapper is a region you can reach with Tab (tabIndex={0}, role="region") and takes your aria-labelledby, naming the caption; the other props are the element’s own, className and ref included.

CSS variables

Override on a root or on a single table.

Variable Default
--plf-table-bg, --plf-table-color Transparent, the surface on pinned cells; text
--plf-table-border Subtle border
--plf-table-header-bg Raised surface
--plf-table-stripe-bg --plf-color-surface-hover, on striped tables
--plf-table-caption-color Muted text
--plf-table-cell-padding Space 2 (8px)
--plf-table-min-width 0

Built with Pelatform UIv0.1.0

Components

Getting started

Foundations

Components

Actions

Data display

Navigation

Feedback

Data input

Layout

Advanced

Integrations

Blocks

Application

Authentication

Icons