Table

Data table with sortable columns, row selection, badge chips, avatar cells, and trend indicators.

import{ Table, TableBadgeChip, TableAvatarCell, TableTrendCell } from "@pepulux/ui"

Default

Name
Role
Status
Revenue
OR
Olivia Rhyeolivia@example.com
AdminActive
$12,400+12%
PB
Phoenix Bakerphoenix@example.com
MemberActive
$8,200+12%
LS
Lana Steinerlana@example.com
MemberInactive
$0+12%

With selection & alternating rows

Name
Role
Status
Revenue
OR
Olivia Rhyeolivia@example.com
AdminActive
$12,400+12%
PB
Phoenix Bakerphoenix@example.com
MemberActive
$8,200+12%
LS
Lana Steinerlana@example.com
MemberInactive
$0+12%

Props

PropTypeDefaultDescription
columns*TableColumn<T>[]—Column definitions — { key, header, render, sortable?, align? }
data*T[]—Row data array
getRowId(row: T) => string—Returns a unique ID per row (required for selection)
selectablebooleanfalseEnables checkbox row selection
selectedIdsstring[]—Controlled selected row IDs
onSelectRow(id: string, checked: boolean) => void—Called when a row checkbox changes
onSelectAll(checked: boolean) => void—Called when header checkbox changes
onSort(key: string, dir: 'asc' | 'desc') => void—Called when a sortable column header is clicked
size"sm" | "md""md"Row height
dividers"line" | "alternating""line"Row separator style
Application component → Tableswww.pepulux.com

Notes and documentation

Space for notes, documentation, and best practices for using these components.

Dense data, clear structure

Align text left and numbers right, keep headers short and make sortable columns obvious. Use cells that fit the data — avatars for people, badges for status, progress for completion.

Provide an empty state and show a loading skeleton while data fetches.

Do

  • Make rows selectable only when there are bulk actions

Don't

  • Put more than a few actions in each row — use a dropdown