Pilipinas Interface

Foundation

  • Overview
  • Get Started
  • Colors
  • Typography
  • Icons
  • Layout & Spacing
  • States & Feedback
  • Motion & Transitions
  • Expressions

Components

  • Overview
  • Accordion
  • Alert
  • Avatar
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Card
  • Checkbox
  • Code Block
  • Combobox
  • Command Menu
  • Dialog
  • Popover
  • Progress
  • Radio Group
  • Scroll Area
  • Select
  • Skeleton
  • Switch
  • Table
  • Tabs
  • Text Field
  • Tooltip

Resources

  • Registry

Components

Table

Applicant ledgers and batch lists. Fluid-hover rows, a size ladder and merged selection fills that reposition with the data. Built for wide admin surfaces.

Preview
Control no.NameBarangayStatus
2026-0271Dela Cruz, AndreaPoblacionFor review
2026-0270Santos, MiguelZone 1For review
2026-0264Reyes, BeaSan IsidroForwarded
2026-0258Lim, CarloPoblacionApproved
<Table size="compact" selectedIndices={selected}>
  <TableHeader><TableRow><TableHead>Applicant</TableHead></TableRow></TableHeader>
  <TableBody><TableRow index={0}><TableCell>Juan Dela Cruz</TableCell></TableRow></TableBody>
</Table>

Usage

Wide ledgers that need scanning, selection and row actions.

Do and don't

  • Do. Give each row an index and use Badge for status columns.
  • Don't. Use it for tiny two-column layouts or expect a built-in sort API.

Composition

TableHeader, TableBody, TableRow, TableHead, TableCell and TableEmpty are all exported. Give each row an index so hover and reorder animation track the right row.

Props

  • size="default" | "compact"; pins the row ladder. Omit to follow the surrounding size context.
  • selectedIndices; ordered row indices with the selection treatment applied.
  • snapKey; change it when rows reorder so selection fills snap to their new positions instead of springing across the table.
  • TableEmpty accepts columns, title, description and action.

Sorting itself is consumer logic. The component animates rows when the data order changes; it does not provide an onSort handler or aria-sort state.

Behavior and states

Rows light under the pointer and under keyboard focus through the same hover layer. Selection is expressed as a merged fill across consecutive selectedIndices, so it reads as one block rather than a row-per-row tint. An empty result uses TableEmpty with a title, an explanation and one next action. See States & Feedback for the shared vocabulary.

Related

Pair with Scroll Area for long vertical lists. Row fills and dividers use the Colors interaction tokens.

← PreviousSwitchNext →Tabs

Install

npx shadcn@latest add @pilipinas/table

For your coding agent